Package org.serviceconnector.api.cln
Class SCService
java.lang.Object
org.serviceconnector.api.cln.SCService
- Direct Known Subclasses:
SCFileService,SCPublishService,SCSessionService
The Class Service. Provides basic stuff for every kind of remote service interfaces.
More informations available in subclasses.
More informations available in subclasses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SCMessageCallbackThe message callback to use for replies.protected booleanThe pending request, marks if a reply is outstanding or if service is ready for next.protected SCRequesterThe requester to communicate.protected SCClientThe SC client.protected StringThe service name.protected booleanThe session active, marks state of a session/subscription.protected StringThe session id - identifies session context of communication. -
Constructor Summary
ConstructorsConstructorDescriptionSCService(SCClient scClient, String serviceName, SCRequester requester) Instantiates a new service. -
Method Summary
Modifier and TypeMethodDescriptionGets the associated SC client.Gets the service name.Gets the session id.booleanisActive()Checks if session in service is active.
-
Field Details
-
serviceName
The service name. The service name is an abstract name and represents the logical address of the service. In order to allow message routing the name must be unique in scope of the entire SC network. Service names must be agreed at the application level and are stored in the SC configuration. -
sessionId
The session id - identifies session context of communication. -
requester
The requester to communicate. -
scClient
The SC client. -
pendingRequest
protected volatile boolean pendingRequestThe pending request, marks if a reply is outstanding or if service is ready for next. -
sessionActive
protected volatile boolean sessionActiveThe session active, marks state of a session/subscription. -
messageCallback
The message callback to use for replies.
-
-
Constructor Details
-
SCService
Instantiates a new service.- Parameters:
scClient- the sc clientserviceName- the service namerequester- the requester
-
-
Method Details
-
getSCClient
Gets the associated SC client.- Returns:
- the SC client
-
isActive
public boolean isActive()Checks if session in service is active.- Returns:
- true, if is active
-
getSessionId
Gets the session id.- Returns:
- the session id
-
getServiceName
Gets the service name.- Returns:
- the service name
-