Package org.serviceconnector.api.srv
Class SCPublishServer
java.lang.Object
org.serviceconnector.api.srv.SCSessionServer
org.serviceconnector.api.srv.SCPublishServer
The Class SCPublishServer. A Server that publishes messages to a SC.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.serviceconnector.api.srv.SCSessionServer
SCSessionServer.SCServerCallback -
Field Summary
Fields inherited from class org.serviceconnector.api.srv.SCSessionServer
registered, requester, scServer, serverTimeout, serviceName -
Constructor Summary
ConstructorsConstructorDescriptionSCPublishServer(SCServer scServer, String serviceName, SCRequester requester) Instantiates a new SC publish server. -
Method Summary
Modifier and TypeMethodDescriptionvoidpublish(int operationTimeoutSeconds, SCPublishMessage publishMessage) Publish message to SC.voidpublish(SCPublishMessage publishMessage) Publish message to SC with default operation timeout.voidregister(int operationTimeoutSeconds, int maxSessions, int maxConnections, SCPublishServerCallback scCallback) Register server on SC.voidregister(int maxSessions, int maxConnections, SCPublishServerCallback scCallback) Register server on SC with default operation timeout.Methods inherited from class org.serviceconnector.api.srv.SCSessionServer
checkRegistration, checkRegistration, deregister, deregister, doRegister, getCheckRegistrationIntervalSeconds, getConnectionType, getKeepAliveIntervalSeconds, getListenerInterfaces, getListenerPort, getMaxConnections, getMaxSessions, getSCHost, getSCPort, getSCServer, getServiceName, isImmediateConnect, isListening, isRegistered, register, register
-
Constructor Details
-
SCPublishServer
Instantiates a new SC publish server.- Parameters:
scServer- the SC serverserviceName- the service namerequester- the requester
-
-
Method Details
-
register
public void register(int maxSessions, int maxConnections, SCPublishServerCallback scCallback) throws SCServiceException, SCMPValidatorException Register server on SC with default operation timeout.- Parameters:
maxSessions- the max sessions to servemaxConnections- the max connections pool uses to connect to SCscCallback- the SC callback- Throws:
SCServiceException- listener not started yet
server already registered for service
register server on SC failed
error message received from SCSCMPValidatorException- callback is not set
-
register
public void register(int operationTimeoutSeconds, int maxSessions, int maxConnections, SCPublishServerCallback scCallback) throws SCServiceException, SCMPValidatorException Register server on SC.- Parameters:
operationTimeoutSeconds- the allowed time in seconds to complete the operationmaxSessions- the max sessions to servemaxConnections- the max connections pool uses to connect to SCscCallback- the SC callback- Throws:
SCServiceException- listener not started yet
server already registered for service
register server on SC failed
error message received from SCSCMPValidatorException- callback is not set
-
publish
public void publish(SCPublishMessage publishMessage) throws SCServiceException, SCMPValidatorException Publish message to SC with default operation timeout.- Parameters:
publishMessage- the publish message- Throws:
SCServiceException- server not registered yet
publish to SC failed
error message received from SCSCMPValidatorException- publish message is not set
-
publish
public void publish(int operationTimeoutSeconds, SCPublishMessage publishMessage) throws SCServiceException, SCMPValidatorException Publish message to SC.- Parameters:
operationTimeoutSeconds- the allowed time in seconds to complete the operationpublishMessage- the publish message- Throws:
SCServiceException- server not registered yet
publish to SC failed
error message received from SCSCMPValidatorException- publish message is not set
-