java.lang.RunnableExampleTCPCompetencypublic abstract class RemoteTCPCompetency extends RemoteCompetency
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
port |
the port on which to establish the tcp connection
|
architectureavailable, competencyName, competencyType, plan, running| Modifier | Constructor | Description |
|---|---|---|
protected |
RemoteTCPCompetency(IArchitecture architecture,
int port,
boolean serverMode,
java.lang.String serverAddress) |
create a new remote TCP competency
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
initialize() |
initialises the tcp connection
|
protected void |
sendMessage(java.lang.String message) |
use this method to send a message to the remotely connected competency.
|
getArchitecture, isConnected, onDestroy, raisecancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, registerHandlers, requestStartCompetency, run, runsInBackground, setAdditionalDatadestroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, schedule, wasDestroyedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompetencyCode, processMessage, returnFailure, returnSuccess, startExecutionprotected RemoteTCPCompetency(IArchitecture architecture, int port, boolean serverMode, java.lang.String serverAddress)
architecture - a reference to the architecture objectport - the port on which we want to establish a connectionserverMode - if true, we act as a server and listen for a remote program to connect,
if false, we assume the role of a client and connect to a server on the networkserverAddress - if serverMode is false this tells us the server address we have to connect
to, if serverMode is true this parameter is not used (can be null)public final void initialize()
initialize in class Competencyprotected final void sendMessage(java.lang.String message)
sendMessage in class RemoteCompetency