|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.server.Server
public class Server
The Server is the general remote server implementation.
It's independent of the communication protocol and handles client requests.
The configuration of the server will be made in the
server.xmlfile. It contains the database connect information.
| Constructor Summary | |
|---|---|
Server()
Creates a new instance of Server. |
|
| Method Summary | |
|---|---|
void |
afterLastCall(java.lang.Object pSessionId,
boolean pCallError)
Notifies the server that all calls were executed. |
void |
beforeFirstCall(java.lang.Object pSessionId)
Notifies the server that at least one call will follow. |
java.lang.Object |
createSession(ChangedHashtable<java.lang.String,java.lang.Object> pProperties)
Creates a new session for an application. |
java.lang.Object |
createSubSession(java.lang.Object pSessionId,
ChangedHashtable<java.lang.String,java.lang.Object> pProperties)
Creates a sub session of an application. |
void |
destroySession(java.lang.Object pSessionId)
Destroyes a session with given identifier. |
java.lang.Object |
execute(java.lang.Object pSessionId,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
Executes a method call. |
java.lang.Object |
executeAction(java.lang.Object pSessionId,
java.lang.String pAction,
java.lang.Object... pParams)
Executes an action call. |
void |
executeActionCallBack(java.lang.Object pSessionId,
ICallBackListener pCallBackListener,
java.lang.String pAction,
java.lang.Object... pParams)
Executes an asynchronous action call. |
void |
executeActionCallBack(java.lang.Object pSessionId,
java.lang.Object pCallBackId,
java.lang.String pAction,
java.lang.Object... pParams)
Executes an asynchronous action call. |
void |
executeCallBack(java.lang.Object pSessionId,
ICallBackListener pCallBackListener,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
Executes an asynchronous method call. |
void |
executeCallBack(java.lang.Object pSessionId,
java.lang.Object pCallBackId,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
Executes an asynchronous method call. |
java.util.List<ResultObject> |
getCallBackResults(java.lang.Object pSessionId)
Returns all available objects of an asynchronous execution. |
static Server |
getInstance()
Gets the current server instance as singleton. |
java.lang.String |
getInstanceKey()
Gets the instance key of this server instance. |
Monitoring |
getMonitoring()
Returns the monitoring object for this server. |
AbstractObjectProvider |
getObjectProvider()
Gets the AbstractObjectProvider. |
ChangedHashtable<java.lang.String,java.lang.Object> |
getProperties(java.lang.Object pSessionId)
Gets all session properties. |
java.lang.Object |
getProperty(java.lang.Object pSessionId,
java.lang.String pName)
Gets the value of a session property. |
DefaultSessionManager |
getSessionManager()
Gets the AbstractSessionManager. |
long |
getStartupTime()
Gets the server startup time. |
static void |
initLogging()
Initializes LoggerFactory. |
ISession |
process(IRequest pRequest,
IResponse pResponse)
Processes client requests which uses the communication protocol. |
void |
push(PushMessage pMessage)
Pushes a message to the registered receiver. |
void |
registerPushReceiver(java.lang.Object pSessionId,
IPushReceiver pReceiver)
Registers a push receiver. |
java.lang.Object[] |
setAndCheckAlive(java.lang.Object pSessionId,
java.lang.Object... pSubSessionId)
Sets the alive state for a session and validates the alive state of sub sessions. |
void |
setNewPassword(java.lang.Object pSessionId,
java.lang.String pOldPassword,
java.lang.String pNewPassword)
Sets a new password for the user of a session. |
void |
setProperty(java.lang.Object pSessionId,
java.lang.String pName,
java.lang.Object pValue)
Sets a session property. |
void |
unregisterPushReceiver(java.lang.Object pSessionId)
Unregisters a push receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Server()
Server.
| Method Detail |
|---|
public static Server getInstance()
public final DefaultSessionManager getSessionManager()
AbstractSessionManager.
getSessionManager in interface IServerpublic final AbstractObjectProvider getObjectProvider()
AbstractObjectProvider.
getObjectProvider in interface IServer
public java.lang.Object createSession(ChangedHashtable<java.lang.String,java.lang.Object> pProperties)
throws java.lang.Throwable
createSession in interface IServerpProperties - the initial session properties
Session
java.lang.Throwable - if the session can not be created
public java.lang.Object createSubSession(java.lang.Object pSessionId,
ChangedHashtable<java.lang.String,java.lang.Object> pProperties)
throws java.lang.Throwable
createSubSession in interface IServerpSessionId - session identifierpProperties - the initial session properties
SubSession
java.lang.Throwable - if the session can not be createdpublic void destroySession(java.lang.Object pSessionId)
destroySession in interface IServerpSessionId - session identifier
public java.lang.Object execute(java.lang.Object pSessionId,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
throws java.lang.Throwable
execute in interface IServerpSessionId - session identifierpObjectName - server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
java.lang.Throwable - if an error occurs during execution
public void executeCallBack(java.lang.Object pSessionId,
java.lang.Object pCallBackId,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
throws java.lang.Throwable
executeCallBack in interface IServerpSessionId - session identifierpCallBackId - the callback identifierpObjectName - server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
java.lang.Throwable - if an error occurs during execution
public void executeCallBack(java.lang.Object pSessionId,
ICallBackListener pCallBackListener,
java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
throws java.lang.Throwable
executeCallBack in interface IDirectServerpSessionId - session identifierpCallBackListener - the callback listenerpObjectName - server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
java.lang.Throwable - if an error occurs during execution
public java.lang.Object executeAction(java.lang.Object pSessionId,
java.lang.String pAction,
java.lang.Object... pParams)
throws java.lang.Throwable
executeAction in interface IServerpSessionId - session identifierpAction - action which should be calledpParams - parameters for the action call
java.lang.Throwable - if an error occurs during execution
public void executeActionCallBack(java.lang.Object pSessionId,
java.lang.Object pCallBackId,
java.lang.String pAction,
java.lang.Object... pParams)
throws java.lang.Throwable
executeActionCallBack in interface IServerpSessionId - session identifierpCallBackId - the callback identifierpAction - action which should be calledpParams - parameters for the action call
java.lang.Throwable - if an error occurs during execution
public void executeActionCallBack(java.lang.Object pSessionId,
ICallBackListener pCallBackListener,
java.lang.String pAction,
java.lang.Object... pParams)
throws java.lang.Throwable
executeActionCallBack in interface IDirectServerpSessionId - session identifierpCallBackListener - the callback listenerpAction - action which should be calledpParams - parameters for the action call
java.lang.Throwable - if an error occurs during execution
public void setProperty(java.lang.Object pSessionId,
java.lang.String pName,
java.lang.Object pValue)
throws java.lang.Throwable
setProperty in interface IServerpSessionId - the session identifierpName - the property namepValue - the value of the property or null to delete the property
java.lang.Throwable - if an error occurs during execution
public java.lang.Object getProperty(java.lang.Object pSessionId,
java.lang.String pName)
throws java.lang.Throwable
getProperty in interface IServerpSessionId - the session identifierpName - the property name
null if the property is not available
java.lang.Throwable - if an error occurs during execution
public ChangedHashtable<java.lang.String,java.lang.Object> getProperties(java.lang.Object pSessionId)
throws java.lang.Throwable
getProperties in interface IServerpSessionId - the session identifier
ChangedHashtable with property names and values
java.lang.Throwable - if an error occurs during execution
public java.util.List<ResultObject> getCallBackResults(java.lang.Object pSessionId)
throws java.lang.Throwable
getCallBackResults in interface IServerpSessionId - session identifier
java.lang.Throwable - if an error occurs during execution
public java.lang.Object[] setAndCheckAlive(java.lang.Object pSessionId,
java.lang.Object... pSubSessionId)
throws java.lang.Throwable
setAndCheckAlive in interface IServerpSessionId - the session idpSubSessionId - the sub session ids
java.lang.Throwable - if an error occurs during execution
public void setNewPassword(java.lang.Object pSessionId,
java.lang.String pOldPassword,
java.lang.String pNewPassword)
throws java.lang.Throwable
setNewPassword in interface IServerpSessionId - the session idpOldPassword - the old passwordpNewPassword - the new password
java.lang.Throwable - if an error occurs during executionpublic void beforeFirstCall(java.lang.Object pSessionId)
beforeFirstCall in interface IDirectServerpSessionId - the session id which will execute at least one call
public void afterLastCall(java.lang.Object pSessionId,
boolean pCallError)
afterLastCall in interface IDirectServerpSessionId - the session id which executed at least one callpCallError - true if at least one call throwed an exception
public void registerPushReceiver(java.lang.Object pSessionId,
IPushReceiver pReceiver)
registerPushReceiver in interface IPushHandlerpSessionId - the connection identifierpReceiver - the receiverpublic void unregisterPushReceiver(java.lang.Object pSessionId)
unregisterPushReceiver in interface IPushHandlerpSessionId - the connection identifierpublic void push(PushMessage pMessage)
push in interface IPushHandlerpMessage - the messagepublic java.lang.String getInstanceKey()
public long getStartupTime()
public ISession process(IRequest pRequest,
IResponse pResponse)
throws java.lang.Exception
pRequest - the requestpResponse - the response
null if the session is not available
java.lang.Exception - if a problem occurs while accessing the in- or output streampublic final Monitoring getMonitoring()
public static final void initLogging()
LoggerFactory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||