Package org.serviceconnector.cmd.srv
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
The Class SrvCommandAdapter. Command adapter for every kind of command on server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static SCMPSessionCompositeRegistryThe session composite registry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SCMPMsgTypegetKey()Gets the key.protected SrvPublishServicegetSrvPublishServiceByServiceName(String serviceName) Gets the srv publish service by service name.protected SrvServicegetSrvServiceByServiceName(String serviceName) Gets the srv service by service name.protected SrvSessionServicegetSrvSessionServiceByServiceName(String serviceName) Gets the srv session service by service name.booleanChecks if command passes through message parts.abstract voidrun(IRequest request, IResponse response, IResponderCallback responderCallback) Run command.voidValidate request.
-
Field Details
-
sessionCompositeRegistry
The session composite registry.
-
-
Constructor Details
-
SrvCommandAdapter
public SrvCommandAdapter()
-
-
Method Details
-
getKey
Gets the key. -
run
public abstract void run(IRequest request, IResponse response, IResponderCallback responderCallback) throws Exception Run command. -
validate
Validate request. -
isPassThroughPartMsg
public boolean isPassThroughPartMsg()Checks if command passes through message parts.- Specified by:
isPassThroughPartMsgin interfaceICommand- Returns:
- true, if is pass through part msg
-
getSrvServiceByServiceName
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
-