public class RpcServer<SessionClazz> extends Object implements Lifecycle, RpcServerServices<SessionClazz>
| Constructor and Description |
|---|
RpcServer() |
| Modifier and Type | Method and Description |
|---|---|
Authenticator |
getAuthenticator()
Get the authenticator value.
|
ContextClassProvider |
getContextClassProvider()
Get the contextClassProvider value.
|
boolean |
getNoDelay()
Get the noDelay value.
|
int |
getReceiveBufferSize()
Get the receiveBufferSize value.
|
String |
getRpcHostname()
Get the rpcHostname value.
|
int |
getRpcPort()
Get the rpcPort value.
|
int |
getSendBufferSize()
Get the sendBufferSize value.
|
List<RpcServiceSpec<SessionClazz>> |
getServiceSpecs()
Get the serviceSpecs value.
|
SessionManager<SessionClazz> |
getSessionManager()
Get the sessionManager value.
|
int |
getThreadPoolCore()
Get the threadPoolCore value.
|
int |
getThreadPoolMax()
Get the threadPoolMax value.
|
boolean |
isRunning() |
SessionId |
login(RpcCredentials inCredentials)
Authenticates the given credentials.
|
void |
logout(String inSessionIdValue)
Invalidates the given session.
|
String |
marshal(Object inObject)
Marshals the given object to XML.
|
void |
setAuthenticator(Authenticator inAuthenticator)
Sets the authenticator value.
|
void |
setContextClassProvider(ContextClassProvider inContextClassProvider)
Sets the contextClassProvider value.
|
void |
setHostname(String inRpcHostname)
Sets the rpcHostname value.
|
void |
setNoDelay(boolean inNoDelay)
Sets the noDelay value.
|
void |
setPort(int inRpcPort)
Sets the rpcPort value.
|
void |
setReceiveBufferSize(int inReceiveBufferSize)
Sets the receiveBufferSize value.
|
void |
setSendBufferSize(int inSendBufferSize)
Sets the sendBufferSize value.
|
void |
setServiceSpecs(List<RpcServiceSpec<SessionClazz>> inServiceSpecs)
Sets the serviceSpecs value.
|
void |
setSessionManager(SessionManager<SessionClazz> inSessionManager)
Sets the sessionManager value.
|
void |
setThreadPoolCore(int inThreadPoolCore)
Sets the threadPoolCore value.
|
void |
setThreadPoolMax(int inThreadPoolMax)
Sets the threadPoolMax value.
|
void |
start() |
void |
stop() |
<Clazz> Clazz |
unmarshall(String inData)
Unmarshals the given XML stream.
|
SessionHolder<SessionClazz> |
validateAndReturnSession(String inSessionIdValue)
Validates that the given session is active.
|
@PostConstruct public void start()
@PreDestroy public void stop()
public List<RpcServiceSpec<SessionClazz>> getServiceSpecs()
List<RpcServiceSpec> valuepublic void setServiceSpecs(List<RpcServiceSpec<SessionClazz>> inServiceSpecs)
inServiceSpecs - a List<RpcServiceSpec> valuepublic int getSendBufferSize()
int valuepublic void setSendBufferSize(int inSendBufferSize)
inSendBufferSize - an int valuepublic int getReceiveBufferSize()
int valuepublic void setReceiveBufferSize(int inReceiveBufferSize)
inReceiveBufferSize - an int valuepublic boolean getNoDelay()
boolean valuepublic void setNoDelay(boolean inNoDelay)
inNoDelay - a boolean valuepublic int getThreadPoolCore()
int valuepublic void setThreadPoolCore(int inThreadPoolCore)
inThreadPoolCore - an int valuepublic int getThreadPoolMax()
int valuepublic void setThreadPoolMax(int inThreadPoolMax)
inThreadPoolMax - an int valuepublic String getRpcHostname()
String valuepublic void setHostname(String inRpcHostname)
inRpcHostname - a String valuepublic int getRpcPort()
int valuepublic void setPort(int inRpcPort)
inRpcPort - an int valuepublic Authenticator getAuthenticator()
Authenticator valuepublic void setAuthenticator(Authenticator inAuthenticator)
inAuthenticator - an Authenticator valuepublic SessionManager<SessionClazz> getSessionManager()
SessionManager<SessionClazz> valuepublic void setSessionManager(SessionManager<SessionClazz> inSessionManager)
inSessionManager - a SessionManager<SessionClazz> valuepublic ContextClassProvider getContextClassProvider()
ContextClassProvider valuepublic void setContextClassProvider(ContextClassProvider inContextClassProvider)
inContextClassProvider - a ContextClassProvider valuepublic SessionId login(RpcCredentials inCredentials)
RpcServerServiceslogin in interface RpcServerServices<SessionClazz>inCredentials - an RpcCredentials valueSessionId valuepublic void logout(String inSessionIdValue)
RpcServerServiceslogout in interface RpcServerServices<SessionClazz>inSessionIdValue - a String valuepublic SessionHolder<SessionClazz> validateAndReturnSession(String inSessionIdValue)
RpcServerServicesvalidateAndReturnSession in interface RpcServerServices<SessionClazz>inSessionIdValue - a String valueSessionHolder<SessionClazz> valuepublic String marshal(Object inObject) throws JAXBException
RpcServerServicesmarshal in interface RpcServerServices<SessionClazz>inObject - an Object valueString valueJAXBException - if an error occurs marshalling the objectpublic <Clazz> Clazz unmarshall(String inData) throws JAXBException
RpcServerServicesunmarshall in interface RpcServerServices<SessionClazz>inData - a String valueClazz valueJAXBException - if an error occurs unmarshalling the streamCopyright © 2015. All Rights Reserved.