Class SCService

java.lang.Object
org.serviceconnector.api.cln.SCService
Direct Known Subclasses:
SCFileService, SCPublishService, SCSessionService

public abstract class SCService extends Object
The Class Service. Provides basic stuff for every kind of remote service interfaces.

More informations available in subclasses.
  • Field Details

    • serviceName

      protected String 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

      protected String sessionId
      The session id - identifies session context of communication.
    • requester

      protected SCRequester requester
      The requester to communicate.
    • scClient

      protected SCClient scClient
      The SC client.
    • pendingRequest

      protected volatile boolean pendingRequest
      The pending request, marks if a reply is outstanding or if service is ready for next.
    • sessionActive

      protected volatile boolean sessionActive
      The session active, marks state of a session/subscription.
    • messageCallback

      protected SCMessageCallback messageCallback
      The message callback to use for replies.
  • Constructor Details

    • SCService

      public SCService(SCClient scClient, String serviceName, SCRequester requester)
      Instantiates a new service.
      Parameters:
      scClient - the sc client
      serviceName - the service name
      requester - the requester
  • Method Details

    • getSCClient

      public SCClient 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

      public String getSessionId()
      Gets the session id.
      Returns:
      the session id
    • getServiceName

      public String getServiceName()
      Gets the service name.
      Returns:
      the service name