initialize

This commit is contained in:
Pruefer
2025-06-06 09:15:13 +02:00
commit fa7c2730f1
5817 changed files with 1339670 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>data-interface-remote-gui-definition</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

View File

@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8

View File

@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="data-interface-remote-gui-definition">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
</wb-module>
</project-modules>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.8"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>

View File

@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-remote-gui-definition</artifactId>
<packaging>jar</packaging>
<name>data-interface-remote-gui-definition</name>
<version>${mes.interface.version}</version>
<parent>
<groupId>com.itac.interface</groupId>
<artifactId>data-interface</artifactId>
<version>${mes.interface.version}</version>
</parent>
<dependencies>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>util-common</artifactId>
</dependency>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>artes-client</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-fuji-definition</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>imsinterfaces-samsung-definition</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-line-dashboard-plugin</artifactId>
</dependency>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>resource-common</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface</groupId>
<artifactId>imsinterfaces-resources-export</artifactId>
</dependency>
</dependencies>
</project>

Binary file not shown.

View File

@@ -0,0 +1,23 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.itac.mes.datainterface.annotaion;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
* @author frankp
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SimulationClass {
String name();
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.data;
import com.itac.resource.ResourcePool;
import com.itac.resource.ResourcesIMSInterfaces;
public enum InterfaceStartType {
WEBSTART_APPLICATION("Webstart-Application", ResourcesIMSInterfaces.WEBSTART_APPLICATION), //
SERVICE("Service-Application", ResourcesIMSInterfaces.SERVICE_APPLICATION), //
UNKNOWN("Unknown", ResourcesIMSInterfaces.UNKNOWN_APPLICATION);
private String startType;
private int resourceId;
private InterfaceStartType(String startType, int resourceId) {
this.startType = startType;
this.resourceId = resourceId;
}
public String getLocalizedText() {
if (resourceId < 0) {
return startType;
}
return ResourcePool.getInstance().getString(resourceId);
}
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.data;
import java.util.EventListener;
import java.util.List;
import com.itac.mes.datainterface.gui.InstanceMessage;
import com.itac.util.logging.LogLevel;
public interface MessageListener extends EventListener {
/** maximale Anzahl Nachrichten, die gepuffert werden sollen */
public static int MAX_MESSAGE_COUNT = 100;
/**
* Hinzuf&uuml;gen einer Message an ein Fenster; anhand des Levels kann der Text farbig dargestellt werden
*
* @param level
* ein g&uuml;ltiger LogLevel (Trace bis Fatal), wobei nur error und FATAL zum Fehlerstatus f&uuml;hren
* @param append
* true, wenn der Text nur hinten angeh&auml;ngt werden soll
* @param text
* beliebiger Text
*/
public void addMessage(String instance, LogLevel level, boolean append, String text);
public void addMessage(String instance, LogLevel level, String text);
public void clear();
public List<InstanceMessage> getInstanceMessages(String instance);
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.factories;
import java.util.List;
import com.itac.mes.datainterface.data.MessageListener;
/**
*
* @author frankp
*/
public interface IConfigurableHandler {
/**
* setzen eines MessageListeners
*
* @param messageListener
* Listener, der Meldungen entgegennimmt und weiter verarbeitet.
* @see MessageListener
*/
public void addMessageListener(MessageListener messageListener);
//
// /**
// * ermitteln des gesetzten MessageListeners
// *
// * @return den aktuellen MessageListener (es gibt nur einen einzigen pro Handler)
// */
public List<MessageListener> getMessageListener();
public String getInstanceName();
public String getName();
/**
* @return
*/
public int getConfigurationResult();
/**
* @return
*/
public String getConfigurationText();
}

View File

@@ -0,0 +1,6 @@
package com.itac.mes.datainterface.gui;
public interface DIMAExecListener {
public void OnExecute(DataInterfaceMenuAction dima);
}

View File

@@ -0,0 +1,8 @@
package com.itac.mes.datainterface.gui;
public interface DIMAPropertyChangeListener {
/** wird ausgelöst, wenn der EnabledState einer Action sich aendert */
public void propertiesChanged(DataInterfaceMenuAction dima);
}

View File

@@ -0,0 +1,131 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import java.util.ArrayList;
import java.util.List;
import com.itac.util.logging.LogHandler;
import com.itac.util.logging.LogLevel;
public class DataInterfaceMenuAction {
private String id;
private String menuText;
private String methodName;
private boolean enabled;
private transient List<ISimulationMessageReceiver> simulationMessageReceiverList;
private transient List<DIMAPropertyChangeListener> propertyChangeListeners;
private String instanceName;
private boolean visible;
private String appid;
public DataInterfaceMenuAction(String menuText, String methodName, String id, boolean enabled) {
this.id = id;
this.menuText = menuText;
this.methodName = methodName;
this.setEnabled(false);
}
public DataInterfaceMenuAction(String menuText, String methodName, String id) {
this(menuText, methodName, id, false);
}
public String getMenuText() {
return menuText;
}
public String getMethodName() {
return methodName;
}
public void setEnabled(boolean enabled) {
boolean propertiesHasChanged = (this.enabled != enabled);
this.enabled = enabled;
if (propertiesHasChanged) {
firePropertiesChanged();
}
}
/** der Zustand der Action hat sich veraendert; alle registrierten Listener werden benachrichtigt */
private void firePropertiesChanged() {
for (DIMAPropertyChangeListener propertyChangeListener : getPropertyChangeListeners()) {
if (propertyChangeListener != null) {
propertyChangeListener.propertiesChanged(this);
}
}
}
public boolean isEnabled() {
return enabled;
}
public void addSimulationMessageReceiver(ISimulationMessageReceiver setSimulationMessageReceiver) {
getSimMessageReceiverList().add(setSimulationMessageReceiver);
}
public void addDIMAPropertyChangeListener(DIMAPropertyChangeListener propertyChangeListener) {
getPropertyChangeListeners().add(propertyChangeListener);
}
public String getId() {
return id;
}
public void setInstanceName(String instanceName) {
this.instanceName = instanceName;
}
public void setVisible(boolean b) {
this.visible = b;
}
public boolean isvisible() {
return visible;
}
private List<ISimulationMessageReceiver> getSimMessageReceiverList() {
if (simulationMessageReceiverList == null) {
simulationMessageReceiverList = new ArrayList<ISimulationMessageReceiver>();
}
return simulationMessageReceiverList;
}
private List<DIMAPropertyChangeListener> getPropertyChangeListeners() {
if (propertyChangeListeners == null) {
propertyChangeListeners = new ArrayList<DIMAPropertyChangeListener>();
}
return propertyChangeListeners;
}
/** Diese Action ausführen bedeutet dass alle registrierten Listener hierueber informiert werden */
public void execute() {
LogHandler.log("DataInterfaceMenuAction", LogLevel.DEBUG, "execute " + toString());
for (ISimulationMessageReceiver receiver : getSimMessageReceiverList()) {
receiver.fireMenuItem(this);
}
}
public String getAppid() {
return appid == null ? "" : appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
@Override
public String toString() {
return "action (" + getId() + ", " + getMenuText() + ", " + getMethodName() + ", instance " + instanceName + ", enabled="
+ isEnabled();
}
public String getInstanceName() {
return instanceName;
}
}

View File

@@ -0,0 +1,109 @@
/*
* To change this template, choose Tools | Templates and open the template in the editor.
*/
package com.itac.mes.datainterface.gui;
import static com.itac.util.logging.LogLevel.INFO;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ServiceLoader;
import com.itac.mes.datainterface.annotaion.SimulationClass;
import com.itac.util.logging.LogHandler;
/**
*
* @author frankp
*/
public class GuiFactory {
private static final String LOGGER = GuiFactory.class.getSimpleName();
private static List<Class<IWorkerPane>> machineSimulationPanelClasses = new ArrayList<Class<IWorkerPane>>();
@SuppressWarnings("unchecked")
public List<Class<IWorkerPane>> getMachineSimulationPanelClasses() {
if (machineSimulationPanelClasses.size() == 0) {
LogHandler.log(LOGGER, INFO, "read info from 'com.itac.mes.IMachineSimulationPane' file");
// den Service Loader nur einmal bemuehen
try {
ServiceLoader<IWorkerPane> availableHandler = ServiceLoader.load(IWorkerPane.class);
Iterator<IWorkerPane> classIterator = availableHandler.iterator();
while (classIterator.hasNext()) {
IWorkerPane handler = null;
try {
handler = classIterator.next();
} catch (Throwable e) {
LogHandler.log(LOGGER, INFO, "failed to read next handler form serviceInfo", e);
continue;
}
LogHandler.log(LOGGER, INFO, "simulation panel " + handler.getClass().getSimpleName() + " found");
machineSimulationPanelClasses.add((Class<IWorkerPane>) handler.getClass());
}
} catch (Throwable th) {
LogHandler.log(LOGGER, INFO, "failed to read ANY handler form serviceInfo", th);
}
}
return machineSimulationPanelClasses;
}
public static IWorkerPane getMachineSimulationPane(Class<?> clazz, String name) {
Class<?>[] formalParameters = new Class[] { String.class };
GuiFactory guiFactory = new GuiFactory();
List<Class<IWorkerPane>> machinesimulationPanelList = guiFactory.getMachineSimulationPanelClasses();
for (Class<IWorkerPane> class1 : machinesimulationPanelList) {
if (class1.isAnnotationPresent(SimulationClass.class)) {
SimulationClass annotation = class1.getAnnotation(SimulationClass.class);
try {
if (clazz.getSimpleName().equals(annotation.name())) {
// mit dem geeigneten Constructor instantiieren und zurückliefern
LogHandler.log(LOGGER, INFO, "create panel " + class1.getSimpleName() + " for simulation " + annotation.name());
// get Constructor
Constructor<?> constructor = class1.getConstructor(formalParameters);
// define the actual arguments to call the constructor with
Object[] actualArguments = new Object[] { name };
// instantiate the IParser and return it
IWorkerPane tempInstance = (IWorkerPane) constructor.newInstance(actualArguments);
// Alle in der laufenden Instanz erzeugten Handler werden automatisch ihre eigenen Parameter erweitern und
// default-Werte setzen
return tempInstance;
}
} catch (Exception e) {
LogHandler.log(LOGGER, INFO, "failed to create panel " + class1.getSimpleName() + " for simulation " + annotation.name(),
e);
}
}
}
return null;
}
public static IWorkerPane getWorkerPane(String instance) {
Class<?>[] formalParameters = new Class[] {};
try {
@SuppressWarnings("unchecked")
Class<IWorkerPane> clazz = (Class<IWorkerPane>) Class.forName("com.itac.mes.datainterface.gui.WorkerPane");
// mit dem geeigneten Constructor instantiieren und zurückliefern
LogHandler.log(LOGGER, INFO, "create worker panel");
// get Constructor
Constructor<IWorkerPane> constructor = clazz.getConstructor(formalParameters);
// define the actual arguments to call the constructor with
Object[] actualArguments = new Object[] {};
// instantiate the IParser and return it
IWorkerPane tempInstance = constructor.newInstance(actualArguments);
tempInstance.setTitle(instance);
LogHandler.log(LOGGER, INFO, "worker pane " + instance + " created!");
// Alle in der laufenden Instanz erzeugten Handler werden automatisch ihre eigenen Parameter erweitern und
// default-Werte setzen
return tempInstance;
} catch (Exception e) {
LogHandler.log(LOGGER, INFO, "failed to create worker panel ", e);
}
return null;
}
}

View File

@@ -0,0 +1,97 @@
/*
* Copyright (c) 2008 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import java.util.Collection;
import java.util.Set;
import com.itac.mes.datainterface.factories.IConfigurableHandler;
/**
* Eine Maschinensimulation ist als Teststand f&uuml;r ein Interface zu sehen, zu dem sich ein Interface verbinden kann
* resp. mit dem ein Interface kommunizieren kann. <br>
* Diese Maschine ist sowohl &uuml;ber eine GUI als auch &uuml;ber ein XML Test Script steuerbar.<br>
* Eine Maschine kann ein grafische Repr&auml;sentation haben, diese wird dann im Interface-Hauptfenster angezeigt. <br>
* Alle Aktionen, die zur Steuerung der Testmaschine n&ouml;tig sind k&ouml;nnen ueber ein Menu im Hauptfenster
* gesteuert werden.
*
* @author frankp
*
*/
public interface IMachineSimulation extends IConfigurableHandler {
/**
* Beispiel der Konfiguration &lt;code><br>
* &lt;simulations><br>
* &lt;simulation name="kittingStation" type="<b>fuji</b>"><br>
* &lt;kittingStation port="11112"/><br>
* &lt;/simulation><br>
*
* @return den Typ der Simulation (TestMaschine), wie er in der Configuration definiert ist.<br>
* Dieser Typ muss auch in den Factories definiert sein. <br>
* @see MachineSimulationFactory
*/
public String getSimulationType();
/**
* Eine Maschinensimulation kann Aktionen haben, die ueber ein Testscript erreichbar sein sollen. Diese Actions
* muessen fuer die Ausfuehrung des XML-Constructs erreichbar sein.
*
* @param action
* @return
*/
public boolean hasAction(String action);
public boolean changeConfiguration(String parameterName, String parameterValue, String line, String machine);
/**
* @return
*/
public Set<String> getCustomActionNames();
public DataInterfaceMenuAction getCustomAction(String name);
public Collection<DataInterfaceMenuAction> getMenuItems();
/**
* jede CustomAction kann hierueber ausgefuehert werden. Die Maschien muss diese Aktionen ueber
* {@link DefaultMachineSimulation#addCustomAction(String, javax.swing.AbstractAction)} hinzufuegen
*
* @param action
* @return true, wenn die Aktion erfolgreich ausgefuehrt wurde
*/
public boolean executeAction(DataInterfaceMenuAction action);
public boolean executeAction(String action, long timeout);
public void execute(DataInterfaceMenuAction menuItem);
public IWorkerPane getWorkerPane();
public void setSimulationMessageReceiver(ISimulationMessageReceiver simulationMessageReceiver);
public void setActionProperties(DataInterfaceMenuAction action);
/**
* @param machineSimPane
*/
public void setSimulationPane(IWorkerPane machineSimPane);
/**
* @param factory
*/
public void setFactory(Object factory);
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import java.util.Collection;
import java.util.List;
import com.itac.mes.datainterface.data.MessageListener;
import com.itac.mes.datainterface.ihap.IRemoteGui;
/**
*
* @author frankp
*/
public interface IMainDlg extends MessageListener, ISimulationMessageReceiver {
public void setVisible(boolean b);
public void setTitle(String title);
public void initFailure();
public IWorkerPane createMachineView(IMachineSimulation simulation, String simulationClass,
Collection<DataInterfaceMenuAction> mnuItemString);
public IWorkerPane getOrCreateWorkerPane(String string);
void createWorkerView(IWorkerPane workerPane, List<DataInterfaceMenuAction> x);
public void setMainPaneName(String mainPaneName);
public String getMainPaneName();
public void setWorker(IWorker worker);
public void setSimulation(IWorker simulation);
public void setActionProperties(DataInterfaceMenuAction action, String instanceName);
public void setInstanceCount(int size);
public void setRemoteGui(IRemoteGui remoteGui);
public String getTitle();
}

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
/**
* @author frankp
*
*/
public interface ISimulationMessageReceiver {
public void fireMenuItem(DataInterfaceMenuAction menuItem);
}

View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
public interface IWorker {
public void startAll();
public void stopAll();
public void finish();
public void executeAction(DataInterfaceMenuAction action);
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import java.util.Collection;
import com.itac.mes.datainterface.data.MessageListener;
/**
* Die Worker Pane ist eine Seite innerhalb derer eine Instance (also eine Ausprägung eines Interface) seine Ausgaben
* darstellen kann. Z.Zt ist als Tab Pane realisiert.
*
* @author frankp
*
*/
public interface IWorkerPane extends MessageListener, DIMAPropertyChangeListener {
public void initialize();
public void setTitle(String string);
public String getTitle();
public void executeAction(String action);
/** koennte auch weggelassen werden */
public void setDescription(String description);
public boolean isSimulation();
public void setSimulation(boolean isSimulation);
/** hiermit wird diese View informiert, dass sich Eigenschaften dieser Action geändert haben */
public void notifyActionPropertiesChanged(DataInterfaceMenuAction action);
public void setMenuItems(Collection<DataInterfaceMenuAction> mnuItemString);
public DataInterfaceMenuAction getMenuActionById(String id);
public void setMachineSimulation(IMachineSimulation machineSimulation);
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import com.itac.util.logging.LogLevel;
public class InstanceMessage {
private String message = "";
private LogLevel level = LogLevel.ALL;
private long date;
public InstanceMessage(LogLevel level, long date, String message) {
this.level = level;
this.date = date;
this.message = message;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public LogLevel getLevel() {
return level;
}
public long getDate() {
return date;
}
}

View File

@@ -0,0 +1,16 @@
/*
* ui * Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
public interface IIHapChannel {
public void setChannelName(String name);
public void shutdown();
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import com.itac.mes.datainterface.gui.DataInterfaceMenuAction;
import com.itac.util.logging.LogLevel;
public interface IRemoteGui extends IIHapChannel {
/**
* In der Working instance haben sich die Properties eines menuItems verändert; ueber diese Schnittstelle kann die
* Remote Gui informiert werden, und die eigenen Items updaten
*/
public void notifyActionPropertiesChanged(String appid, String instanceName, DataInterfaceMenuAction action);
/**
* Methoden vom MessageListener Anhand der Werte können die verschiedenen Instanzen unterschieden werden
*/
public void addMessage(String appid, String instanceName, LogLevel level, boolean append, String text);
public void addMessage(String appid, String instanceName, LogLevel level, String text);
public void clear(String appid, String instanceName);
public void finish(String appid);
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2013 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import java.util.List;
import com.itac.mes.datainterface.data.InterfaceStartType;
import com.itac.mes.datainterface.gui.DataInterfaceMenuAction;
import com.itac.mes.datainterface.gui.ISimulationMessageReceiver;
import com.itac.mes.datainterface.gui.InstanceMessage;
/** alle Methoden, die von der Gui console an einer GUI-losen Interface-Instanz aufgerufen werden können. */
public interface IRemoteInterface extends ISimulationMessageReceiver {
// Liste mit allen Instanzen und den aktuellen Zustaenden
public List<InstanceInfo> getInstanceInfos();
public void setGuiConsoleProperties(String host, int port);
public List<DataInterfaceMenuAction> getActions(String instanceName);
public List<String> getMenuItems(String instanceName);
/** zu einer Instanz alle bisher aufgetretenen Messages mit den entsprechenden Leveln holen */
public List<InstanceMessage> getInstanceMessages(String instanceName);
/** den Namen des Haupt-Tabs (z.B. "Interface", in dem die Hauptmeldungen auftauchen */
public String getMainTab();
public String getDescription(String instanceName);
public String getTitle(String instanceName);
public void shutdown();
/**
*
* @return {@linkplain InterfaceStartType#SERVICE }oder {@linkplain InterfaceStartType#WEBSTART_APPLICATION},
* je nach dem wie dieses Interface gestartet wurde
*/
public InterfaceStartType getStartType();
public void exitApplication();
}

View File

@@ -0,0 +1,220 @@
/*
* Copyright (c) 2010 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.DEBUG;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import static com.itac.util.logging.LogLevel.TRACE;
import static com.itac.util.logging.LogLevel.WARN;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Socket;
import java.net.SocketException;
import java.util.Hashtable;
import com.itac.artes.ihap.ArtesRemoteException;
import com.itac.artes.ihap.FaultCode;
import com.itac.artes.ihap.IhapCall;
import com.itac.artes.ihap.IhapInputStream;
import com.itac.artes.ihap.IhapOutputStream;
import com.itac.artes.ihap.IhapProtocolException;
import com.itac.artes.ihap.serialize.ProtocolMapping;
import com.itac.artes.ihap.serialize.ProtocolMappingFactory;
import com.itac.util.logging.LogHandler;
/**
* @author frankp created 2010
*/
public class IhapRemoteGuiEventHandler {
private static final String LOGGER = IhapRemoteGuiEventHandler.class.getSimpleName();
private static final long serialVersionUID = -3032397461757597876L;
/** Map mit den Namen aller zu empfangenden Methoden */
private static Hashtable<String, Method> _methodMap;
private int handlerCounter;
private IRemoteGui _iRemoteGui;
private Socket _client;
private IhapOutputStream _ios;
private IhapInputStream _iis;
private boolean _isShutdown;
private String handlerName = "";
private Thread receiveThread;
private PropertyChangeListener clientEventHandlerCloseListener;
public IhapRemoteGuiEventHandler(Socket client, IRemoteGui eventHandler,
PropertyChangeListener clientEventHandlerCloseListener) {
handlerCounter++;
this._client = client;
this._iRemoteGui = eventHandler;
this.clientEventHandlerCloseListener = clientEventHandlerCloseListener;
initMethodMap();
// das ist der initiale Name des Empfangthreads. Wenn der
// iTAC.OIB.Adapter die Methode setChannelName aufruft wird
// der neue (eindeutige Name) an den Thread vergeben. Der ist dann auch
// mit Tools wie z.B. JvisualVM zu sehen
handlerName = "IhapRemoteGuiEventHandler#" + handlerCounter;
try {
_ios = new IhapOutputStream(_client.getOutputStream());
} catch (IOException e1) {
LogHandler.log(LOGGER, ERROR, toString() + " failed to create input stream!", e1);
}
try {
_iis = new IhapInputStream(_client.getInputStream());
} catch (IOException e1) {
LogHandler.log(LOGGER, ERROR, toString() + " failed to create output stream!", e1);
}
receiveThread = new Thread(handlerName) {
@Override
public void run() {
try {
while (!_isShutdown && isConnected()) {
receiveCall();
}
} catch (Exception e) {
// keine Fehlerausgabe, wird durch shutdown() korrekt
// behandelt!
shutdown();
}
}
@Override
public String toString() {
return IhapRemoteGuiEventHandler.this.toString();
}
};
receiveThread.start();
}
/**
* einmalig für diese Klasse eine Map aufbauen, in der alle remote aufrufbaren Methoden enthalten sind.
*/
private static void initMethodMap() {
if (_methodMap != null) {
return;
}
ProtocolMapping protocolMapping = ProtocolMappingFactory.getMapping(1);
_methodMap = new Hashtable<String, Method>();
Method[] methods = IRemoteGui.class.getDeclaredMethods();
for (Method method : methods) {
_methodMap.put(protocolMapping.getOverloadMethodName(method), method);
}
// ebenso alle Methoden der implementierten Interface eintragen
Class<?>[] classes = IRemoteGui.class.getInterfaces();
LogHandler.log(LOGGER, DEBUG, "implements interface '" + IRemoteGui.class.getSimpleName() + "' and all super interfaces");
for (Class<?> superInterface : classes) {
LogHandler.log(LOGGER, TRACE, "implements callback interface: " + superInterface.getSimpleName());
methods = superInterface.getDeclaredMethods();
for (Method method : methods) {
_methodMap.put(protocolMapping.getOverloadMethodName(method), method);
}
}
}
/**
* shutting down this connection
*/
public void shutdown() {
_isShutdown = true;
try {
if (clientEventHandlerCloseListener != null) {
clientEventHandlerCloseListener.propertyChange(new PropertyChangeEvent(this, this.handlerName, "closeChannel", null));
}
} catch (Exception e) {
}
try {
_client.close();
} catch (Exception e) {
LogHandler.log(LOGGER, WARN, handlerName + " closing tcp client failed!", e);
}
}
protected boolean isConnected() {
return _client.isConnected();
}
private void receiveCall() throws IOException {
try {
Exception fault = null;
Object returnValue = null;
String methodName = null;
try {
boolean boolValue = _iis.readBoolean();
if (!boolValue) {
IhapCall lCall = _iis.readCall();
methodName = lCall.getOverloadMethodName();
LogHandler.log(LOGGER, INFO, toString() + " receive method call '" + methodName + "'");
if (methodName.equals("setChannelName_string")) {
handlerName = lCall.getArgs()[0].toString();
receiveThread.setName(handlerName);
} else if (_methodMap.containsKey(methodName)) {
Method lMethod = _methodMap.get(methodName);
Object[] args = lCall.getArgs();
returnValue = lMethod.invoke(_iRemoteGui, args);
} else {
throw new NoSuchMethodException();
}
} else {
return;
}
} catch (IhapProtocolException pe) {
if (pe.getMessage().endsWith("end of file")) {
throw pe;
}
fault = new ArtesRemoteException(toString() + "Unable to read client request", pe);
_ios.writeFaultReply(FaultCode.ProtocolException, fault);
} catch (NoSuchMethodException nsm) {
fault = new ArtesRemoteException(toString() + "Unknown method '" + methodName + "'");
_ios.writeFaultReply(FaultCode.NoSuchMethodException, fault);
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
if (e instanceof InvocationTargetException) {
e = (InvocationTargetException) e;
}
fault = e;
_ios.writeFaultReply(FaultCode.ServiceException, fault);
}
if (fault == null) {
_ios.writeSuccessReply(returnValue);
}
} catch (SocketException socketException) {
LogHandler.log(LOGGER, INFO, toString() + " disconnected!");
shutdown();
} catch (IOException ioe) {
if (ioe.getMessage().endsWith("end of file")) {
LogHandler.log(LOGGER, INFO, toString() + " disconnected!");
shutdown();
} else {
LogHandler.log(LOGGER, ERROR, toString() + ": Error receiving call:" + ioe.getMessage() + "\n", ioe);
}
throw ioe;
} finally {
try {
_ios.flush();
} catch (IOException ioe) {
}
}
}
@Override
public String toString() {
return "Handler " + handlerName + " on socket(" + _client.getRemoteSocketAddress() + ")";
}
}

View File

@@ -0,0 +1,203 @@
/*
* Copyright (c) 2008 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.DEBUG;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import static com.itac.util.logging.LogLevel.TRACE;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.Socket;
import com.itac.artes.ihap.IhapFaultReply;
import com.itac.artes.ihap.IhapInputStream;
import com.itac.artes.ihap.IhapOutputStream;
import com.itac.artes.ihap.IhapProtocolException;
import com.itac.artes.ihap.IhapReply;
import com.itac.artes.ihap.IhapSuccessReply;
import com.itac.util.logging.LogHandler;
/**
* Dieser Handler ist daf&uuml;r verantwortlich Daten vom DataInterface per Ihap zu &uuml;bertragen. Er muss merken, wenn die
* Verbindung nicht mehr besteht (&Uuml;berwachung des Kanals).
*/
public class IhapRemoteGuiHandler implements InvocationHandler {
/** Intervall in Millies, in denen die Verbindung gecheckt wird ob der Server noch aktiv ist. */
private static final int CONNECTION_CHECK_MILLIES = 500;
private static final String LOGGER = IhapRemoteGuiHandler.class.getSimpleName();
private Socket _socket;
private IhapInputStream _iis;
private IhapOutputStream _ios;
private boolean _isShutdown;
private String channelName;
private long lastCall = System.currentTimeMillis();
private Object lockObject = new Object();
private PropertyChangeListener connectionStateChangeListener;
private Thread aliveThread;
public static IRemoteGui connect(String host, int port, String channelName, PropertyChangeListener connectionStateCloseListener)
throws IOException {
IhapRemoteGuiHandler handler = new IhapRemoteGuiHandler();
@SuppressWarnings("resource")
Socket socket = new Socket(host, port);
handler._socket = socket;
handler._iis = new IhapInputStream(socket.getInputStream());
handler._ios = new IhapOutputStream(socket.getOutputStream());
handler.channelName = channelName;
// handler.aliveThread.setName(channelName + "AliveThread");
handler.connectionStateChangeListener = connectionStateCloseListener;
//
// handler._iis.setDebug(true);
// handler._ios.setDebug(true);
IRemoteGui iHapServiceChannel = (IRemoteGui) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class[] { IRemoteGui.class }, handler);
iHapServiceChannel.setChannelName(channelName);
return iHapServiceChannel;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Object result = null;
if (method.getName().equals("isShutdown")) {
return _isShutdown;
} else if (method.getName().equals("startup")) {
// überwachung der Verbindung...
LogHandler.log(LOGGER, TRACE,
toString() + " startup, new " + channelName + "AliveThread on local port=" + _socket.getLocalPort());
aliveThread = new Thread(channelName + "AliveThread") {
@Override
public void run() {
while (!_isShutdown && !isInterrupted()) {
// wenn der letzte Call länger als .. her ist...
try {
Thread.sleep(50);
} catch (InterruptedException e) { // ignore this exception
}
if (System.currentTimeMillis() - lastCall > CONNECTION_CHECK_MILLIES) {
try {
// versuchen den Server zu pingen
// wenn das fehlschlägt ist die Verbindung kaputt
synchronized (lockObject) {
// das erfolgreiche Schreiben eines booleschen Wertes ist aus Kommunikationssicht zu sehen wie der
// erfolgreiche Aufruf einer Methode. Damit kann geprüft werden, ob die Gegenstelle (TcpServer) noch
// aktiv ist.
if (!_isShutdown && !isInterrupted()) {
// nur wenn die Verbindung nicht bereits gestoppt wurde oder die DataInterface Applikation
// heruntergefahren wird...
_ios.writeBoolean(true);
_ios.flush();
lastCall = System.currentTimeMillis();
}
}
} catch (IOException e3) {
try {
_isShutdown = true;
_socket.close();
} catch (IOException e) {
// wenn beim schliessen der Verbindung noch was passiert ist das nicht schlimm
LogHandler.log(LOGGER, INFO, "shutdown connection problem for " + channelName, e);
} finally {
// die Schreibverbindung ist kaputt, also diese Connection töten...
LogHandler.log(LOGGER, DEBUG, "detected broken connection for " + channelName + " because Server closed port");
connectionClosed();
}
} catch (Exception except) {
LogHandler.log(LOGGER, ERROR, "shutdown connection problem for " + channelName, except);
}
}
}
}
};
aliveThread.start();
return null;
} else if (method.getName().equals("getChannelName")) {
return this.channelName;
} else if (method.getName().equals("shutdown")) {
stopAliveThread();
_isShutdown = true;
LogHandler.log(LOGGER, TRACE, "shut down " + channelName + " on local port " + _socket.getLocalPort() + " finished");
_socket.close();
connectionClosed();
return null;
}
synchronized (lockObject) {
_ios.writeBoolean(false);
result = sendCall(method, args);
}
return result;
}
protected void connectionClosed() {
if (connectionStateChangeListener != null) {
connectionStateChangeListener.propertyChange(new PropertyChangeEvent(this, "connectionClosed", null, null));
}
}
/**
*
*/
private void stopAliveThread() {
if (aliveThread == null) {
return;
}
if (aliveThread.isAlive()) {
aliveThread.interrupt();
}
aliveThread = null;
}
private Object sendCall(Method method, Object[] args) throws Exception {
lastCall = System.currentTimeMillis();
Object result = null;
try {
_ios.call(method, args);
_ios.flush();
LogHandler.log(LOGGER, TRACE, toString() + ": flush methodcall " + method.getName());
IhapReply reply = _iis.readReply();
if (reply instanceof IhapSuccessReply) {
result = ((IhapSuccessReply) reply).getReturnValue();
} else {
IhapFaultReply fault = (IhapFaultReply) reply;
switch (fault.getFaultCode()) {
case NoSuchMethodException:
throw new NoSuchMethodException(fault.getMessage());
case ProtocolException:
throw new IhapProtocolException(fault.getMessage(), null);
default:
throw new IhapProtocolException(fault.getMessage(), null);
}
}
} catch (Exception e) {
LogHandler.log(LOGGER, ERROR, toString() + ": invoking remote call " + method.getName() + " failed.");
stopAliveThread();
throw e;
}
return result;
}
public String getChannelName() {
return channelName;
}
@Override
public String toString() {
return "Channel " + channelName;
}
}

View File

@@ -0,0 +1,220 @@
/*
* Copyright (c) 2010 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.DEBUG;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import static com.itac.util.logging.LogLevel.TRACE;
import static com.itac.util.logging.LogLevel.WARN;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Socket;
import java.net.SocketException;
import java.util.Hashtable;
import com.itac.artes.ihap.ArtesRemoteException;
import com.itac.artes.ihap.FaultCode;
import com.itac.artes.ihap.IhapCall;
import com.itac.artes.ihap.IhapInputStream;
import com.itac.artes.ihap.IhapOutputStream;
import com.itac.artes.ihap.IhapProtocolException;
import com.itac.artes.ihap.serialize.ProtocolMapping;
import com.itac.artes.ihap.serialize.ProtocolMappingFactory;
import com.itac.util.logging.LogHandler;
/**
* @author frankp created 2010
*/
public class IhapRemoteInterfaceEventHandler {
private static final String LOGGER = IhapRemoteInterfaceEventHandler.class.getSimpleName();
private static final long serialVersionUID = -3032397461757597876L;
/** Map mit den Namen aller zu empfangenden Methoden */
private static Hashtable<String, Method> _methodMap;
private int handlerCounter;
private IRemoteInterface _iRemoteInterface;
private Socket _client;
private IhapOutputStream _ios;
private IhapInputStream _iis;
private boolean _isShutdown;
private String handlerName = "";
private Thread receiveThread;
private PropertyChangeListener clientEventHandlerCloseListener;
public IhapRemoteInterfaceEventHandler(Socket client, IRemoteInterface eventHandler,
PropertyChangeListener clientEventHandlerCloseListener) {
handlerCounter++;
this._client = client;
this._iRemoteInterface = eventHandler;
this.clientEventHandlerCloseListener = clientEventHandlerCloseListener;
initMethodMap();
// das ist der initiale Name des Empfangthreads. Wenn der
// Sender die Methode setChannelName aufruft wird
// der neue (eindeutige Name) an den Thread vergeben. Der ist dann auch
// mit Tools wie z.B. JvisualVM zu sehen
handlerName = "IhapRemoteInterfaceEventHandler#" + handlerCounter;
try {
_ios = new IhapOutputStream(_client.getOutputStream());
} catch (IOException e1) {
LogHandler.log(LOGGER, ERROR, toString() + " failed to create input stream!", e1);
}
try {
_iis = new IhapInputStream(_client.getInputStream());
} catch (IOException e1) {
LogHandler.log(LOGGER, ERROR, toString() + " failed to create output stream!", e1);
}
receiveThread = new Thread(handlerName) {
@Override
public void run() {
try {
while (!_isShutdown && isConnected()) {
receiveCall();
}
} catch (Exception e) {
// keine Fehlerausgabe, wird durch shutdown() korrekt
// behandelt!
shutdown();
}
}
@Override
public String toString() {
return IhapRemoteInterfaceEventHandler.this.toString();
}
};
receiveThread.start();
}
/**
* einmalig für diese Klasse eine Map aufbauen, in der alle remote aufrufbaren Methoden enthalten sind.
*/
private static void initMethodMap() {
if (_methodMap != null) {
return;
}
ProtocolMapping protocolMapping = ProtocolMappingFactory.getMapping(1);
_methodMap = new Hashtable<String, Method>();
Method[] methods = IRemoteInterface.class.getDeclaredMethods();
for (Method method : methods) {
_methodMap.put(protocolMapping.getOverloadMethodName(method), method);
}
// ebenso alle Methoden der implementierten Interface eintragen
Class<?>[] classes = IRemoteInterface.class.getInterfaces();
LogHandler.log(LOGGER, DEBUG, "implements interface '" + IRemoteInterface.class.getSimpleName() + "' and all super interfaces");
for (Class<?> superInterface : classes) {
LogHandler.log(LOGGER, TRACE, "implements callback interface: " + superInterface.getSimpleName());
methods = superInterface.getDeclaredMethods();
for (Method method : methods) {
_methodMap.put(protocolMapping.getOverloadMethodName(method), method);
}
}
}
/**
* shutting down this connection
*/
public void shutdown() {
_isShutdown = true;
try {
if (clientEventHandlerCloseListener != null) {
clientEventHandlerCloseListener.propertyChange(new PropertyChangeEvent(this, this.handlerName, "closeChannel", null));
}
} catch (Exception e) {
}
try {
_client.close();
} catch (Exception e) {
LogHandler.log(LOGGER, WARN, handlerName + " closing tcp client failed!", e);
}
}
protected boolean isConnected() {
return _client.isConnected();
}
private void receiveCall() throws IOException {
try {
Exception fault = null;
Object returnValue = null;
String methodName = null;
try {
boolean boolValue = _iis.readBoolean();
if (!boolValue) {
IhapCall lCall = _iis.readCall();
methodName = lCall.getOverloadMethodName();
LogHandler.log(LOGGER, INFO, toString() + " receive method call '" + methodName + "'");
if (methodName.equals("setChannelName_string")) {
handlerName = lCall.getArgs()[0].toString();
receiveThread.setName(handlerName);
} else if (_methodMap.containsKey(methodName)) {
Method lMethod = _methodMap.get(methodName);
Object[] args = lCall.getArgs();
returnValue = lMethod.invoke(_iRemoteInterface, args);
} else {
throw new NoSuchMethodException();
}
} else {
return;
}
} catch (IhapProtocolException pe) {
if (pe.getMessage().endsWith("end of file")) {
throw pe;
}
fault = new ArtesRemoteException(toString() + "Unable to read client request", pe);
_ios.writeFaultReply(FaultCode.ProtocolException, fault);
} catch (NoSuchMethodException nsm) {
fault = new ArtesRemoteException(toString() + "Unknown method '" + methodName + "'");
_ios.writeFaultReply(FaultCode.NoSuchMethodException, fault);
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
if (e instanceof InvocationTargetException) {
e = (InvocationTargetException) e;
}
fault = e;
_ios.writeFaultReply(FaultCode.ServiceException, fault);
}
if (fault == null) {
_ios.writeSuccessReply(returnValue);
}
} catch (SocketException socketException) {
LogHandler.log(LOGGER, INFO, toString() + " disconnected!");
shutdown();
} catch (IOException ioe) {
if (ioe.getMessage().endsWith("end of file")) {
LogHandler.log(LOGGER, INFO, toString() + " disconnected!");
shutdown();
} else {
LogHandler.log(LOGGER, ERROR, toString() + ": Error receiving call:" + ioe.getMessage() + "\n", ioe);
}
throw ioe;
} finally {
try {
_ios.flush();
} catch (IOException ioe) {
}
}
}
@Override
public String toString() {
return "Handler " + handlerName + " on socket(" + _client.getRemoteSocketAddress() + ")";
}
}

View File

@@ -0,0 +1,203 @@
/*
* Copyright (c) 2008 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.DEBUG;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import static com.itac.util.logging.LogLevel.TRACE;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.Socket;
import com.itac.artes.ihap.IhapFaultReply;
import com.itac.artes.ihap.IhapInputStream;
import com.itac.artes.ihap.IhapOutputStream;
import com.itac.artes.ihap.IhapProtocolException;
import com.itac.artes.ihap.IhapReply;
import com.itac.artes.ihap.IhapSuccessReply;
import com.itac.util.logging.LogHandler;
/**
* Dieser Handler ist daf&uuml;r verantwortlich Daten vom DataInterface per Ihap zum iTAC.OIB.Adapter zu
* &uuml;bertragen. Er muss merken, wenn die Verbindung nicht mehr besteht (&Uuml;berwachung des Kanals).
*/
public class IhapRemoteInterfaceHandler implements InvocationHandler {
/** Intervall in Millies, in denen die Verbindung gecheckt wird ob der Server noch aktiv ist. */
private static final int CONNECTION_CHECK_MILLIES = 500;
private static final String LOGGER = IhapRemoteInterfaceHandler.class.getSimpleName();
private Socket _socket;
private IhapInputStream _iis;
private IhapOutputStream _ios;
private boolean _isShutdown;
private String channelName;
private long lastCall = System.currentTimeMillis();
private Object lockObject = new Object();
private PropertyChangeListener connectionStateChangeListener;
private Thread aliveThread;
public static IRemoteInterface connect(String host, int port, String channelName,
PropertyChangeListener connectionStateCloseListener) throws IOException {
IhapRemoteInterfaceHandler handler = new IhapRemoteInterfaceHandler();
@SuppressWarnings("resource")
Socket socket = new Socket(host, port);
handler._socket = socket;
handler._iis = new IhapInputStream(socket.getInputStream());
handler._ios = new IhapOutputStream(socket.getOutputStream());
handler.channelName = channelName;
// handler.aliveThread.setName(channelName + "AliveThread");
handler.connectionStateChangeListener = connectionStateCloseListener;
//
// handler._iis.setDebug(true);
// handler._ios.setDebug(true);
IRemoteInterface oibServiceChannel = (IRemoteInterface) Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(), new Class[] { IRemoteInterface.class }, handler);
// oibServiceChannel.setChannelName(channelName);
return oibServiceChannel;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Object result = null;
if (method.getName().equals("isShutdown")) {
return _isShutdown;
} else if (method.getName().equals("startup")) {
// überwachung der Verbindung...
LogHandler.log(LOGGER, TRACE,
toString() + " startup, new " + channelName + "AliveThread on local port=" + _socket.getLocalPort());
aliveThread = new Thread(channelName + "AliveThread") {
@Override
public void run() {
while (!_isShutdown && !isInterrupted()) {
// wenn der letzte Call länger als .. her ist...
try {
Thread.sleep(50);
} catch (InterruptedException e) { // ignore this exception
}
if (System.currentTimeMillis() - lastCall > CONNECTION_CHECK_MILLIES) {
try {
// versuchen den Server zu pingen
// wenn das fehlschlägt ist die Verbindung kaputt
synchronized (lockObject) {
// das erfolgreiche Schreiben eines booleschen Wertes ist aus Kommunikationssicht zu sehen wie der
// erfolgreiche Aufruf einer Methode. Damit kann geprüft werden, ob die Gegenstelle (TcpServer) im
// iTAC.OIB.Adapter noch aktiv ist.
if (!_isShutdown && !isInterrupted()) {
// nur wenn die Verbindung nicht bereits gestoppt wurde oder die DataInterface Applikation
// heruntergefahren wird...
_ios.writeBoolean(true);
_ios.flush();
lastCall = System.currentTimeMillis();
}
}
} catch (IOException e3) {
try {
_isShutdown = true;
_socket.close();
} catch (IOException e) {
// wenn beim schliessen der Verbindung noch was passiert ist das nicht schlimm
LogHandler.log(LOGGER, INFO, "shutdown connection problem for " + channelName, e);
} finally {
// die Schreibverbindung ist kaputt, also diese Connection töten...
LogHandler.log(LOGGER, DEBUG, "detected broken connection for " + channelName + " because Server closed port");
connectionClosed();
}
} catch (Exception except) {
LogHandler.log(LOGGER, ERROR, "shutdown connection problem for " + channelName, except);
}
}
}
}
};
aliveThread.start();
return null;
} else if (method.getName().equals("getChannelName")) {
return this.channelName;
} else if (method.getName().equals("shutdown")) {
stopAliveThread();
_isShutdown = true;
LogHandler.log(LOGGER, TRACE, "shut down " + channelName + " on local port " + _socket.getLocalPort() + " finished");
_socket.close();
connectionClosed();
return null;
}
synchronized (lockObject) {
_ios.writeBoolean(false);
result = sendCall(method, args);
}
return result;
}
protected void connectionClosed() {
if (connectionStateChangeListener != null) {
connectionStateChangeListener.propertyChange(new PropertyChangeEvent(this, "connectionClosed", null, null));
}
}
/**
*
*/
private void stopAliveThread() {
if (aliveThread == null) {
return;
}
if (aliveThread.isAlive()) {
aliveThread.interrupt();
}
aliveThread = null;
}
private Object sendCall(Method method, Object[] args) throws Exception {
lastCall = System.currentTimeMillis();
Object result = null;
try {
_ios.call(method, args);
_ios.flush();
LogHandler.log(LOGGER, TRACE, toString() + ": flush methodcall " + method.getName());
IhapReply reply = _iis.readReply();
if (reply instanceof IhapSuccessReply) {
result = ((IhapSuccessReply) reply).getReturnValue();
} else {
IhapFaultReply fault = (IhapFaultReply) reply;
switch (fault.getFaultCode()) {
case NoSuchMethodException:
throw new NoSuchMethodException(fault.getMessage());
case ProtocolException:
throw new IhapProtocolException(fault.getMessage(), null);
default:
throw new IhapProtocolException(fault.getMessage(), null);
}
}
} catch (Exception e) {
LogHandler.log(LOGGER, ERROR, toString() + ": invoking remote call " + method.getName() + " failed.");
stopAliveThread();
throw e;
}
return result;
}
public String getChannelName() {
return channelName;
}
@Override
public String toString() {
return "Channel " + channelName;
}
}

View File

@@ -0,0 +1,138 @@
/*
* Copyright (c) 2010 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import com.itac.util.logging.LogHandler;
/**
* Diese Klasse beinhaltet die connections, akzeptiert neue Verbindungen und empfängt events. Zusätzlich können die
* remote Methoden aufgerufen werden!!!
*
* @author frankp created 2010
*/
public class InterfaceSocketAdapter {
/**
*
*/
private static final String LOGGER = InterfaceSocketAdapter.class.getSimpleName();
private List<IhapRemoteInterfaceEventHandler> _channels = new ArrayList<IhapRemoteInterfaceEventHandler>();
private ServerSocket _listener = null;
private IRemoteInterface interfaceEventHandler = null;
private boolean _isShutdown = false;
private Thread socketAdapterThread;
private PropertyChangeListener clientEventHandlerCloseListener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
// der clientHandler mit dem Namen wird abgebrochen oder geschlossen
IhapRemoteInterfaceEventHandler clientEventHandler = (IhapRemoteInterfaceEventHandler) evt.getSource();
if (_channels.contains(clientEventHandler)) {
_channels.remove(clientEventHandler);
LogHandler.log(LOGGER, INFO, "removing socket connection " + evt.getPropertyName());
}
}
};
public InterfaceSocketAdapter(int listeningPort, IRemoteInterface eventHandler) {
LogHandler.log(LOGGER, INFO, "create socket listener for port " + listeningPort);
try {
_listener = new java.net.ServerSocket(listeningPort);
} catch (IOException e) {
LogHandler.log(LOGGER, ERROR, "no socket listener for port " + listeningPort + " created", e);
return;
}
LogHandler.log(LOGGER, INFO, "Listen on port " + listeningPort);
this.interfaceEventHandler = eventHandler;
start();
}
/**
*
*/
public void start() {
if (socketAdapterThread != null && !socketAdapterThread.isInterrupted()) {
LogHandler.log(LOGGER, INFO, "SocketAdapter already running");
return;
}
LogHandler.log(LOGGER, INFO, "Startup SocketAdapter ");
socketAdapterThread = new Thread("InterfaceSocketAdapter") {
@SuppressWarnings("resource")
public void run() {
while (!_isShutdown) {
Socket client = null;
try {
client = _listener.accept();
} catch (Exception e) {
break;
}
IhapRemoteInterfaceEventHandler handler = new IhapRemoteInterfaceEventHandler(client, interfaceEventHandler,
clientEventHandlerCloseListener);
_channels.add(handler);
LogHandler.log(LOGGER, INFO, "Incoming socket connection from " + client.getRemoteSocketAddress());
}
}
};
socketAdapterThread.start();
LogHandler.log(LOGGER, INFO, "Startup SocketAdapter finished.");
}
public void stop() {
// wenn der AcceptThread nicht läuft einfach fertig
if (socketAdapterThread == null || socketAdapterThread.isInterrupted()) {
LogHandler.log(LOGGER, INFO, "no SocketAdapter running");
return;
}
socketAdapterThread.interrupt();
try {
_listener.close();
} catch (IOException e) {
LogHandler.log(LOGGER, ERROR, "closing socketAdapter failed", e);
}
}
/**
*
*/
public void shutdown() {
LogHandler.log(LOGGER, INFO, "shutdown Socket Adapter for incoming Channels from iTAC.OIB.Adapter");
_isShutdown = true;
try {
_listener.close();
for (IhapRemoteInterfaceEventHandler channel : _channels) {
channel.shutdown();
}
_channels.clear();
} catch (Exception e) {
}
LogHandler.log(LOGGER, INFO, "Listen port closed.");
}
}

View File

@@ -0,0 +1,137 @@
/*
* Copyright (c) 2010 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.ihap;
import static com.itac.util.logging.LogLevel.ERROR;
import static com.itac.util.logging.LogLevel.INFO;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import com.itac.util.logging.LogHandler;
/**
* Diese Klasse beinhaltet die connections, akzeptiert neue Verbindungen und empfängt events. Zusätzlich können die
* remote Methoden aufgerufen werden!!!
*
* @author frankp created 2010
*/
public class RemoteGuiSocketAdapter {
/**
*
*/
private static final String LOGGER = RemoteGuiSocketAdapter.class.getSimpleName();
private List<IhapRemoteGuiEventHandler> _channels = new ArrayList<IhapRemoteGuiEventHandler>();
private ServerSocket _listener = null;
private IRemoteGui _iRemoteGui = null;
private boolean _isShutdown = false;
private Thread socketAdapterThread;
private PropertyChangeListener clientEventHandlerCloseListener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
// der clientHandler mit dem Namen wird abgebrochen oder geschlossen
IhapRemoteGuiEventHandler clientEventHandler = (IhapRemoteGuiEventHandler) evt.getSource();
if (_channels.contains(clientEventHandler)) {
_channels.remove(clientEventHandler);
LogHandler.log(LOGGER, INFO, "removing socket connection " + evt.getPropertyName());
}
}
};
public RemoteGuiSocketAdapter(int listeningPort, IRemoteGui eventHandler) {
LogHandler.log(LOGGER, INFO, "create socket listener for port " + listeningPort);
try {
_listener = new java.net.ServerSocket(listeningPort);
} catch (IOException e) {
LogHandler.log(LOGGER, ERROR, "no socket listener for port " + listeningPort + " created", e);
return;
}
LogHandler.log(LOGGER, INFO, "Listen on port " + listeningPort);
this._iRemoteGui = eventHandler;
start();
}
/**
*
*/
public void start() {
if (socketAdapterThread != null && !socketAdapterThread.isInterrupted()) {
LogHandler.log(LOGGER, INFO, "SocketAdapter already running");
return;
}
LogHandler.log(LOGGER, INFO, "Startup SocketAdapter ");
socketAdapterThread = new Thread("SocketAdapter") {
@SuppressWarnings("resource")
public void run() {
while (!_isShutdown) {
Socket client = null;
try {
client = _listener.accept();
} catch (Exception e) {
break;
}
IhapRemoteGuiEventHandler handler = new IhapRemoteGuiEventHandler(client, _iRemoteGui, clientEventHandlerCloseListener);
_channels.add(handler);
LogHandler.log(LOGGER, INFO, "Incoming socket connection from " + client.getRemoteSocketAddress());
}
}
};
socketAdapterThread.start();
LogHandler.log(LOGGER, INFO, "Startup SocketAdapter finished.");
}
public void stop() {
// wenn der AcceptThread nicht läuft einfach fertig
if (socketAdapterThread == null || socketAdapterThread.isInterrupted()) {
LogHandler.log(LOGGER, INFO, "no SocketAdapter running");
return;
}
socketAdapterThread.interrupt();
try {
_listener.close();
} catch (IOException e) {
LogHandler.log(LOGGER, ERROR, "closing socketAdapter failed", e);
}
}
/**
*
*/
public void shutdown() {
LogHandler.log(LOGGER, INFO, "shutdown Socket Adapter for incoming Channels from iTAC.OIB.Adapter");
_isShutdown = true;
try {
_listener.close();
for (IhapRemoteGuiEventHandler channel : _channels) {
channel.shutdown();
}
_channels.clear();
} catch (Exception e) {
}
LogHandler.log(LOGGER, INFO, "Listen port closed.");
}
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright (c) 2010 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.simulation;
public interface IAdapterControl {
public default void startSetupCenterNotifyReceiver() {}
public default void stopSetupCenterNotifyReceiver() {}
// / <summary>
// / subscriptions starten
// / </summary>
public default void startMonitoringReceiver() {}
// / <summary>
// / subscriptions anhalten und austragen
// / </summary>
public default void stopMonitoringReceiver() {}
// / <summary>
// / subscriptions starten
// / </summary>
public default void startTraceReceiver() {}
// / <summary>
// / subscriptions anhalten und austragen
// / </summary>
public default void stopTraceReceiver() {}
/// <summary>
/// subscriptions starten
/// </summary>
public default void startBoardGateKeeper() {}
/// <summary>
/// subscriptions anhalten und austragen
/// </summary>
public default void stopBoardGateKeeper() {}
/**
* Starting the Receiver for Dek<br>
* 1. DekPrinterExternalControlReceiver
*/
public default void startDekReceiver() {}
/**
* Stopping the Receiver for Dek<br>
* 1. DekPrinterExternalControlReceiver
*/
public default void stopDekReceiver() {}
/**
* simple methode um die Verbindung zum Adapter zu testen
*/
public default boolean ping() {
return false;
}
public default boolean isSetupStation() {
return false;
}
/**
* dem Adapter die Interface-Konfiguration mitteilen
*
* @param ipAddress
* die Adresse, auf der das Interface zu erreichen ist
* @param hostName
* der host, auf dem das Interface zu erreichen ist
*/
public default void setInterfaceHost(int port, String ipAddress, String canonicalHostName, String hostName) {}
public default void setChannelName(String channelName) {}
}

View File

@@ -0,0 +1,22 @@
/*
* Copyright (c) 2016 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.simulation;
import com.itac.mes.datainterface.gui.IWorkerPane;
/**
* Alle Funktionen die von der Simulation an der GUI aufgerufen werden k&ouml;nnen.
*
* @author frankp
*
*/
public interface ICommonSmtSimPane extends IWorkerPane {
public String getMesItemProducedContent();
}

View File

@@ -0,0 +1,17 @@
package com.itac.mes.datainterface.simulation;
public interface IDatabasePane {
public void logCommand(String readableString) ;
public void logDbException(Exception e);
public String getSqlStatement();
public void setConnectionString(String connectionString);
public void clear();
void log(String text);
}

View File

@@ -0,0 +1,26 @@
package com.itac.mes.datainterface.simulation;
import com.itac.mes.datainterface.data.fuji.message.Message;
import com.itac.mes.datainterface.gui.IWorkerPane;
/**
* Alle Funktionen die von der Simulation an der GUI aufgerufen werden k&ouml;nnen.
* @author frankp
*
*/
public interface IFujiSimPane extends IWorkerPane {
public void setClientConnected(boolean b);
public void setServerStarted(Boolean startState);
/**
* l&ouml;schen aller bisher in den Eingangspuffer enthaltenene Nachrichten*/
public void clear();
public void receiveMessage(Message msg);
public void sendMessage(Message msg);
}

View File

@@ -0,0 +1,20 @@
package com.itac.mes.datainterface.simulation;
import com.itac.mes.linedashboard.data.MachineStatusRequest;
import com.itac.mes.linedashboard.data.ProductionTimeRequest;
import com.itac.mes.linedashboard.data.QuantityAndFailureUploadRequest;
import com.itac.mes.linedashboard.data.StationResultRequest;
public interface ILineDashboardSimulation {
public int getPage();
public ProductionTimeRequest getProductionTimeRequest();
public StationResultRequest getStationResultRequest();
public QuantityAndFailureUploadRequest getUploadQuantityRequest();
public MachineStatusRequest getMachineStatusRequest();
}

View File

@@ -0,0 +1,12 @@
package com.itac.mes.datainterface.simulation;
import com.itac.mes.datainterface.gui.IWorkerPane;
public interface IPanaCimPane extends IWorkerPane {
public void setConnectionText(String clientConnectionText);
public void receiveMessage(String msg);
public void sendMessage(String msg);
}

View File

@@ -0,0 +1,52 @@
package com.itac.mes.datainterface.simulation;
import com.itac.mes.datainterface.data.samsung.message.Message;
import com.itac.mes.datainterface.gui.IWorkerPane;
/**
* Alle Funktionen die von der Simulation an der GUI aufgerufen werden k&ouml;nnen.
*
* @author frankp
*
*/
public interface ISamsungSimPane extends IWorkerPane {
public void setClientConnected(boolean b);
public void setServerStarted(Boolean startState);
/**
* l&ouml;schen aller bisher in den Eingangspuffer enthaltenene Nachrichten
*/
public void clear();
public void receiveMessage(Message msg);
public void sendMessage(Message msg);
public String getReelBarcodeId();
public String getBoardBarcode();
public String getInterlockingResponseCode();
public String getReelInfoResponseCode();
public String getPlacementProgramFileName();
public String getPlacementProgramContent();
public String getReelQuantity();
/**
* @return the job name from the BoardBarcode Page
*/
public String getJobName();
/** Traceabilitydata methods */
public String getTraceabilityDataFileName();
public String getTracebilityDataContent();
}

View File

@@ -0,0 +1,19 @@
package com.itac.mes.datainterface.simulation;
import java.io.File;
import com.itac.mes.datainterface.gui.IWorkerPane;
public interface ITestCenterPane extends IWorkerPane {
// öffentliche Operationen auf dem TestCenter
public void setDirectoryName(File sourceDirectory);
public void clearFiles();
public void setFiles(File[] directory);
public File[] getSelectedScripts();
public void setScriptText(String string);
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright (c) 2016 iTAC Software AG, Germany. All Rights Reserved.
*
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
* without the written permission of iTAC Software AG.
*/
package com.itac.mes.datainterface.gui;
import static org.junit.Assert.assertNull;
import org.junit.Test;
/**
* @author frankp
*
*/
public class GuiFactoryTest {
@Test
public void test() {
// no dependencies to any worker panes, no creation
assertNull(GuiFactory.getWorkerPane("default"));
}
}

View File

@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Built-By: frankp
Build-Jdk: 1.8.0_111
Created-By: Maven Integration for Eclipse

View File

@@ -0,0 +1,7 @@
#Generated by Maven Integration for Eclipse
#Tue Oct 13 14:05:19 CEST 2020
version=9.10.00beta-DEVELOPER
groupId=com.itac.interface.interfaces
m2e.projectName=data-interface-remote-gui-definition
m2e.projectLocation=C\:\\projects_jee\\imsinterface\\mainline\\interface\\remoteguidefinition
artifactId=data-interface-remote-gui-definition

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-remote-gui-definition</artifactId>
<packaging>jar</packaging>
<name>data-interface-remote-gui-definition</name>
<version>${mes.interface.version}</version>
<parent>
<groupId>com.itac.interface</groupId>
<artifactId>data-interface</artifactId>
<version>${mes.interface.version}</version>
</parent>
<dependencies>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>util-common</artifactId>
</dependency>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>artes-client</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-fuji-definition</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>imsinterfaces-samsung-definition</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface.interfaces</groupId>
<artifactId>data-interface-line-dashboard-plugin</artifactId>
</dependency>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>resource-common</artifactId>
</dependency>
<dependency>
<groupId>com.itac.interface</groupId>
<artifactId>imsinterfaces-resources-export</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,5 @@
#Generated by Maven
#Tue Jun 12 15:11:01 CEST 2018
version=9.00.01alpha-DEVELOPER
groupId=com.itac.interface.interfaces
artifactId=data-interface-remote-gui-definition

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.itac.mes.datainterface.gui.GuiFactoryTest" time="0.141" errors="0" skipped="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
<property name="java.vm.version" value="25.111-b14"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.script" value=""/>
<property name="user.country" value="DE"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value=""/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
<property name="java.runtime.version" value="1.8.0_111-b14"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
<property name="os.arch" value="amd64"/>
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="user.variant" value=""/>
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="os.version" value="10.0"/>
<property name="user.home" value="C:\Users\frankp"/>
<property name="user.timezone" value="Europe/Berlin"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="Cp1252"/>
<property name="user.name" value="frankp"/>
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="de"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_111"/>
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
<property name="sun.stderr.encoding" value="cp850"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value="amd64"/>
</properties>
<testcase classname="com.itac.mes.datainterface.gui.GuiFactoryTest" name="test" time="0.141"/>
</testsuite>

View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: com.itac.mes.datainterface.gui.GuiFactoryTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.234 sec