|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.AbstractChannel
com.genesyslab.platform.commons.protocol.DuplexChannel
com.genesyslab.platform.commons.protocol.ClientChannel
com.genesyslab.platform.management.protocol.LocalControlAgentProtocol
@ProtocolDescription.Tag(sdkName="Management", protocolName="LocalControlAgent") public class LocalControlAgentProtocol
Use a LocalControlAgentProtocol
object to establish
communication between a client application and Genesys Local Control Agent.
LocalControlAgentProtocol lcaProtocol =
new LocalControlAgentProtocol(
new Endpoint(
lcaEPName,
"localhost",
lcaPort));
lcaProtocol.setClientName(clientName);
lcaProtocol.setClientId(clientDbid);
lcaProtocol.setApplicationType(23); // - CFGThirdPartyServer
lcaProtocol.open();
When you are finished communicating with the server, you can close the
channel like this:
lcaProtocol.close();
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including LocalControlAgentProtocol
) are no longer "final
".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.ClientChannel |
---|
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler |
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel |
---|
AbstractChannel.AsyncErrorNotifier |
Field Summary |
---|
Fields inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel |
---|
messageFilter |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
DEF_INPUT_SIZE |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
DEFAULT_TIMEOUT, INFINITE_TIMEOUT |
Constructor Summary | |
---|---|
LocalControlAgentProtocol()
Creates a new LocalControlAgentProtocol object. |
|
LocalControlAgentProtocol(Endpoint endpoint)
Creates a new LocalControlAgentProtocol object. |
|
LocalControlAgentProtocol(int lcaPort)
|
Method Summary | |
---|---|
java.lang.Integer |
getApplicationType()
Returns application type handshake property value. This value represents ordinal integer value of correspondent enumeration value from the Configuration Protocol - CfgAppType . |
KeyValueCollection |
getAppParams()
Returns the application AppParams attribute value for the LCA registration request. |
java.lang.Boolean |
getAutoRestart()
Returns application AutoRestart attribute value for the LCA registration request. |
java.lang.Integer |
getCheckTimeInterval()
Returns the application CheckTimeInterval attribute value for the LCA registration request. |
int |
getClientId()
Returns client id for the LCA connection handshake. |
java.lang.String |
getClientName()
Returns the LCA (Management Framework integration interface) client name for connection handshake procedure. |
java.lang.String |
getCmdLine()
Returns the application command line attribute value for the LCA registration request. |
java.lang.String |
getCmdParams()
Returns the application command line parameters attribute value for the LCA registration request. |
java.lang.Integer |
getControlStatus()
Returns initial application status value to be reported on the handshake procedure (connection open). It represents ordinal number of ApplicationStatus enumeration value.Default value is defined as ApplicationStatus.Initializing . |
ApplicationExecutionMode |
getExecutionMode()
Returns initial execution mode value to be reported to LCA on the handshake procedure (connection open). Default value is ApplicationExecutionMode.Primary . |
int |
getProcessId()
Returns the LCA client application PID handshake option value. By default this value is initialized by try to parse result of java.lang.management.ManagementFactory.getRuntimeMXBean().getName() . |
java.lang.Integer |
getShutdownTimeout()
Returns the application shutdown timeout attribute value for the LCA registration request. |
java.lang.Integer |
getStartupTimeout()
Returns the application startup timeout attribute value for the LCA registration request. |
java.lang.String |
getVersion()
Returns the application version attribute value for the LCA registration request. |
java.lang.String |
getWorkdir()
Returns the application working directory attribute value for the LCA registration request. |
protected void |
onClose(ConnectionClosedEvent event)
|
protected void |
onOpen()
This method is called when channel is opened and just about to call event handler. |
protected void |
onReceiveMessage(Message event)
Gives to subclass a chance to perform some operations on incoming message arrival before delivering it to connection user code. |
protected void |
onSetEndpoint(Endpoint endpoint)
This method is notified before setting a endpoint to the channel. |
void |
setApplicationType(java.lang.Integer applicationType)
Sets application type optional handshake property value. This value represents ordinal integer value of correspondent enumeration value from the Configuration Protocol - CfgAppType . |
void |
setAppParams(KeyValueCollection appParams)
Sets the application AppParams attribute value for the LCA registration request. |
void |
setAutoRestart(java.lang.Boolean autoRestart)
Sets the application AutoRestart attribute value for the LCA registration request. |
void |
setCheckTimeInterval(java.lang.Integer checkTimeInterval)
Sets the application CheckTimeInterval attribute value for the LCA registration request. |
void |
setClientId(int clientId)
Sets client id for the LCA connection handshake. |
void |
setClientName(java.lang.String clientName)
Sets the LCA (Management Framework integration interface) client name for connection handshake procedure. |
void |
setCmdLine(java.lang.String cmdLine)
Sets the application command line attribute value for the LCA registration request. |
void |
setCmdParams(java.lang.String cmdParams)
Sets the application command line parameters attribute value for the LCA registration request. |
void |
setControlStatus(java.lang.Integer appStatus)
Sets initial application status value to be reported on the handshake procedure (connection open). It represents ordinal number of ApplicationStatus enumeration value.Default value is defined as ApplicationStatus.Initializing . |
void |
setExecutionMode(ApplicationExecutionMode execMode)
Sets initial execution mode value to be reported to LCA on the handshake procedure (connection open). Default value is ApplicationExecutionMode.Primary . |
void |
setProcessId(int processId)
Sets the LCA client application system process ID to be passed to local LCA for process status control. By default this value is initialized by try to parse result of java.lang.management.ManagementFactory.getRuntimeMXBean().getName() . |
void |
setShutdownTimeout(java.lang.Integer shutdownTimeout)
Sets the application shutdown timeout attribute value for the LCA registration request. |
void |
setStartupTimeout(java.lang.Integer startupTimeout)
Sets the application startup timeout attribute value for the LCA registration request. |
void |
setVersion(java.lang.String version)
Sets the application version attribute value for the LCA registration request. |
void |
setWorkdir(java.lang.String workdir)
Sets the application working directory attribute value for the LCA registration request. |
Methods inherited from class com.genesyslab.platform.commons.protocol.ClientChannel |
---|
beginClose, beginOpen, beginRequest, close, close, closeAsync, closeAsync, disableConnectionOperations, doBeginRequest, doBeginRequest, doRequest, endRequest, endRequest, fireUnsolicitedEvents, getCopyResponse, getInvoker, getOpenTimeoutException, getReferenceBuilder, onSend, onUnexpectedHandshakeMessage, open, openAsync, openAsync, request, request, requestAsync, requestAsync, setAddressResolver, setAddressResolverParams, setAddressResolverParams, setCopyResponse, setEndpoint, setHandshakeFinished, setHandshakePhase, setHandshakeUnsolicitedEventsPassLimit, setRegistrationHandler, setState, submitRegMessage, throwOnUnReferenceableRequest |
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel |
---|
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getServerContext, getState, getStateMods, getTimeout, internal, releaseDefaultInvoker, removeChannelListener, setConfiguration, setInvoker, setServerContext, setState, setTimeout, throwNotClosed, throwNotOpened, throwNotOpenedOnClose, throwNotOpenedOnSend, throwNull, throwNullEndpoint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Protocol |
---|
getProtocolId |
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel |
---|
setMessageHandler |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver |
---|
receive, receive |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
clearInput, getInputSize, releaseReceivers, setInputSize |
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel |
---|
addListener, removeListener, send |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
close, getTimeout, open, setTimeout |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel |
---|
getState |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport |
---|
addChannelListener, removeChannelListener |
Methods inherited from interface com.genesyslab.platform.commons.protocol.InterceptorSupport |
---|
getInterceptor |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement |
---|
setReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement |
---|
resetReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport |
---|
configure, getConfiguration |
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport |
---|
getEndpoint |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ProtocolDescriptionSupport |
---|
getProtocolDescription |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncInvokerSupport |
---|
setInvoker |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConnectionInvokerSupport |
---|
setConnectionInvoker |
Constructor Detail |
---|
public LocalControlAgentProtocol()
LocalControlAgentProtocol
object.
public LocalControlAgentProtocol(Endpoint endpoint) throws ProtocolException
LocalControlAgentProtocol
object.
endpoint
- The endpoint (server) you wish to connect to.
It should be only loopback (localhost or ::1).
ProtocolException
public LocalControlAgentProtocol(int lcaPort) throws ProtocolException
ProtocolException
Method Detail |
---|
protected void onSetEndpoint(Endpoint endpoint)
AbstractChannel
onSetEndpoint
in class AbstractChannel
endpoint
- new endpointpublic java.lang.String getClientName()
getClientName
in interface LocalControlAgentProtocolHandshakeOptions
setClientName(String)
public void setClientName(java.lang.String clientName)
setClientName
in interface LocalControlAgentProtocolHandshakeOptions
clientName
- client namepublic void setControlStatus(java.lang.Integer appStatus)
ApplicationStatus
enumeration value.ApplicationStatus.Initializing
.
setControlStatus
in interface LocalControlAgentProtocolHandshakeOptions
appStatus
- initial application statusApplicationStatus
public java.lang.Integer getControlStatus()
ApplicationStatus
enumeration value.ApplicationStatus.Initializing
.
getControlStatus
in interface LocalControlAgentProtocolHandshakeOptions
setControlStatus(Integer)
public void setExecutionMode(ApplicationExecutionMode execMode)
ApplicationExecutionMode.Primary
.
setExecutionMode
in interface LocalControlAgentProtocolHandshakeOptions
execMode
- initial execution mode valueApplicationExecutionMode
public ApplicationExecutionMode getExecutionMode()
ApplicationExecutionMode.Primary
.
getExecutionMode
in interface LocalControlAgentProtocolHandshakeOptions
setExecutionMode(ApplicationExecutionMode)
,
ApplicationExecutionMode
public void setClientId(int clientId)
setClientId
in interface LocalControlAgentProtocolHandshakeOptions
clientId
- client idpublic int getClientId()
getClientId
in interface LocalControlAgentProtocolHandshakeOptions
setClientId(int)
public int getProcessId()
java.lang.management.ManagementFactory.getRuntimeMXBean().getName()
.
In case of Sun JVM this value looks like "<jvm-pid>@<hostname>".
getProcessId
in interface LocalControlAgentProtocolHandshakeOptions
setProcessId(int)
public void setProcessId(int processId)
java.lang.management.ManagementFactory.getRuntimeMXBean().getName()
.
In case of Sun JVM this value looks like "<jvm-pid>@<hostname>".
This method can be used if the PID is not properly extracted from the JVM
for some reason or there is a need to override its value.
setProcessId
in interface LocalControlAgentProtocolHandshakeOptions
processId
- LCA client application PIDManagementFactory.getRuntimeMXBean()
,
RuntimeMXBean.getName()
public java.lang.Integer getApplicationType()
CfgAppType
.
getApplicationType
in interface LocalControlAgentProtocolHandshakeOptions
setApplicationType(Integer)
,
CfgAppType
public void setApplicationType(java.lang.Integer applicationType)
CfgAppType
.
setApplicationType
in interface LocalControlAgentProtocolHandshakeOptions
applicationType
- type of the client applicationCfgAppType
public void setAutoRestart(java.lang.Boolean autoRestart)
LocalControlAgentProtocolHandshakeOptions
setAutoRestart
in interface LocalControlAgentProtocolHandshakeOptions
autoRestart
- the auto-restart attribute value, or null (default value) to do not send this attribute.public java.lang.Boolean getAutoRestart()
LocalControlAgentProtocolHandshakeOptions
getAutoRestart
in interface LocalControlAgentProtocolHandshakeOptions
public void setWorkdir(java.lang.String workdir)
LocalControlAgentProtocolHandshakeOptions
setWorkdir
in interface LocalControlAgentProtocolHandshakeOptions
workdir
- the application working directory attribute value.public java.lang.String getWorkdir()
LocalControlAgentProtocolHandshakeOptions
getWorkdir
in interface LocalControlAgentProtocolHandshakeOptions
public void setCmdLine(java.lang.String cmdLine)
LocalControlAgentProtocolHandshakeOptions
setCmdLine
in interface LocalControlAgentProtocolHandshakeOptions
cmdLine
- the application command line attribute value.public java.lang.String getCmdLine()
LocalControlAgentProtocolHandshakeOptions
getCmdLine
in interface LocalControlAgentProtocolHandshakeOptions
public void setCmdParams(java.lang.String cmdParams)
LocalControlAgentProtocolHandshakeOptions
setCmdParams
in interface LocalControlAgentProtocolHandshakeOptions
cmdParams
- the application command line parameters attribute value.public java.lang.String getCmdParams()
LocalControlAgentProtocolHandshakeOptions
getCmdParams
in interface LocalControlAgentProtocolHandshakeOptions
public void setVersion(java.lang.String version)
LocalControlAgentProtocolHandshakeOptions
setVersion
in interface LocalControlAgentProtocolHandshakeOptions
version
- the application version attribute value.public java.lang.String getVersion()
LocalControlAgentProtocolHandshakeOptions
getVersion
in interface LocalControlAgentProtocolHandshakeOptions
public void setAppParams(KeyValueCollection appParams)
LocalControlAgentProtocolHandshakeOptions
setAppParams
in interface LocalControlAgentProtocolHandshakeOptions
appParams
- the application AppParams attribute value.public KeyValueCollection getAppParams()
LocalControlAgentProtocolHandshakeOptions
getAppParams
in interface LocalControlAgentProtocolHandshakeOptions
public void setCheckTimeInterval(java.lang.Integer checkTimeInterval)
LocalControlAgentProtocolHandshakeOptions
setCheckTimeInterval
in interface LocalControlAgentProtocolHandshakeOptions
checkTimeInterval
- the application CheckTimeInterval attribute value.public java.lang.Integer getCheckTimeInterval()
LocalControlAgentProtocolHandshakeOptions
getCheckTimeInterval
in interface LocalControlAgentProtocolHandshakeOptions
public void setStartupTimeout(java.lang.Integer startupTimeout)
LocalControlAgentProtocolHandshakeOptions
setStartupTimeout
in interface LocalControlAgentProtocolHandshakeOptions
startupTimeout
- the application startup timeout attribute value.public java.lang.Integer getStartupTimeout()
LocalControlAgentProtocolHandshakeOptions
getStartupTimeout
in interface LocalControlAgentProtocolHandshakeOptions
public void setShutdownTimeout(java.lang.Integer shutdownTimeout)
LocalControlAgentProtocolHandshakeOptions
setShutdownTimeout
in interface LocalControlAgentProtocolHandshakeOptions
shutdownTimeout
- the application shutdown timeout attribute value.public java.lang.Integer getShutdownTimeout()
LocalControlAgentProtocolHandshakeOptions
getShutdownTimeout
in interface LocalControlAgentProtocolHandshakeOptions
protected void onOpen() throws ProtocolException
DuplexChannel
onOpen
in class ClientChannel
ProtocolException
- if there are problems during
post open operations (e.g. registration)protected void onClose(ConnectionClosedEvent event)
onClose
in class DuplexChannel
protected void onReceiveMessage(Message event)
DuplexChannel
onReceiveMessage
in class ClientChannel
event
- received message
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |