Class SrvCommandAdapter

java.lang.Object
org.serviceconnector.cmd.srv.SrvCommandAdapter
All Implemented Interfaces:
ICommand
Direct Known Subclasses:
SrvAbortSessionCommand, SrvAbortSubscriptionCommand, SrvChangeSubscriptionCommand, SrvCreateSessionCommand, SrvDeleteSessionCommand, SrvExecuteCommand, SrvSubscribeCommand, SrvUnsubscribeCommand

public abstract class SrvCommandAdapter extends Object implements ICommand
The Class SrvCommandAdapter. Command adapter for every kind of command on server.
  • Field Details

  • Constructor Details

    • SrvCommandAdapter

      public SrvCommandAdapter()
  • Method Details

    • getKey

      public abstract SCMPMsgType getKey()
      Gets the key.
      Specified by:
      getKey in interface ICommand
      Returns:
      the key
    • run

      public abstract void run(IRequest request, IResponse response, IResponderCallback responderCallback) throws Exception
      Run command.
      Specified by:
      run in interface ICommand
      Parameters:
      request - the request
      response - the response
      responderCallback - callback to the responder
      Throws:
      Exception - the exception
    • validate

      public void validate(IRequest request) throws Exception
      Validate request.
      Specified by:
      validate in interface ICommand
      Parameters:
      request - the request
      Throws:
      Exception - the exception
    • isPassThroughPartMsg

      public boolean isPassThroughPartMsg()
      Checks if command passes through message parts.
      Specified by:
      isPassThroughPartMsg in interface ICommand
      Returns:
      true, if is pass through part msg
    • getSrvServiceByServiceName

      protected SrvService getSrvServiceByServiceName(String serviceName) throws SCMPCommandException
      Gets the srv service by service name.
      Parameters:
      serviceName - the service name
      Returns:
      the srv service by service name
      Throws:
      SCMPCommandException - the SCMP command exception
    • getSrvSessionServiceByServiceName

      protected SrvSessionService getSrvSessionServiceByServiceName(String serviceName) throws SCMPCommandException
      Gets the srv session service by service name.
      Parameters:
      serviceName - the service name
      Returns:
      the srv session service by service name
      Throws:
      SCMPCommandException - the SCMP command exception
    • getSrvPublishServiceByServiceName

      protected SrvPublishService getSrvPublishServiceByServiceName(String serviceName) throws SCMPCommandException
      Gets the srv publish service by service name.
      Parameters:
      serviceName - the service name
      Returns:
      the srv publish service by service name
      Throws:
      SCMPCommandException - the SCMP command exception