|
||||||||||
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 IServer
public 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 IServer
pProperties
- the initial session properties
Session
java.lang.Throwable
- if the session can not be createdpublic java.lang.Object createSubSession(java.lang.Object pSessionId, ChangedHashtable<java.lang.String,java.lang.Object> pProperties) throws java.lang.Throwable
createSubSession
in interface IServer
pSessionId
- 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 IServer
pSessionId
- session identifierpublic 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 IServer
pSessionId
- 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 executionpublic 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 IServer
pSessionId
- 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 executionpublic 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 IDirectServer
pSessionId
- 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 executionpublic java.lang.Object executeAction(java.lang.Object pSessionId, java.lang.String pAction, java.lang.Object... pParams) throws java.lang.Throwable
executeAction
in interface IServer
pSessionId
- session identifierpAction
- action which should be calledpParams
- parameters for the action call
java.lang.Throwable
- if an error occurs during executionpublic 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 IServer
pSessionId
- session identifierpCallBackId
- the callback identifierpAction
- action which should be calledpParams
- parameters for the action call
java.lang.Throwable
- if an error occurs during executionpublic void executeActionCallBack(java.lang.Object pSessionId, ICallBackListener pCallBackListener, java.lang.String pAction, java.lang.Object... pParams) throws java.lang.Throwable
executeActionCallBack
in interface IDirectServer
pSessionId
- session identifierpCallBackListener
- the callback listenerpAction
- action which should be calledpParams
- parameters for the action call
java.lang.Throwable
- if an error occurs during executionpublic void setProperty(java.lang.Object pSessionId, java.lang.String pName, java.lang.Object pValue) throws java.lang.Throwable
setProperty
in interface IServer
pSessionId
- 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 executionpublic java.lang.Object getProperty(java.lang.Object pSessionId, java.lang.String pName) throws java.lang.Throwable
getProperty
in interface IServer
pSessionId
- the session identifierpName
- the property name
null
if the property is not available
java.lang.Throwable
- if an error occurs during executionpublic ChangedHashtable<java.lang.String,java.lang.Object> getProperties(java.lang.Object pSessionId) throws java.lang.Throwable
getProperties
in interface IServer
pSessionId
- the session identifier
ChangedHashtable
with property names and values
java.lang.Throwable
- if an error occurs during executionpublic java.util.List<ResultObject> getCallBackResults(java.lang.Object pSessionId) throws java.lang.Throwable
getCallBackResults
in interface IServer
pSessionId
- session identifier
java.lang.Throwable
- if an error occurs during executionpublic java.lang.Object[] setAndCheckAlive(java.lang.Object pSessionId, java.lang.Object... pSubSessionId) throws java.lang.Throwable
setAndCheckAlive
in interface IServer
pSessionId
- the session idpSubSessionId
- the sub session ids
java.lang.Throwable
- if an error occurs during executionpublic void setNewPassword(java.lang.Object pSessionId, java.lang.String pOldPassword, java.lang.String pNewPassword) throws java.lang.Throwable
setNewPassword
in interface IServer
pSessionId
- 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 IDirectServer
pSessionId
- the session id which will execute at least one callpublic void afterLastCall(java.lang.Object pSessionId, boolean pCallError)
afterLastCall
in interface IDirectServer
pSessionId
- the session id which executed at least one callpCallError
- true
if at least one call throwed an exceptionpublic void registerPushReceiver(java.lang.Object pSessionId, IPushReceiver pReceiver)
registerPushReceiver
in interface IPushHandler
pSessionId
- the connection identifierpReceiver
- the receiverpublic void unregisterPushReceiver(java.lang.Object pSessionId)
unregisterPushReceiver
in interface IPushHandler
pSessionId
- the connection identifierpublic void push(PushMessage pMessage)
push
in interface IPushHandler
pMessage
- 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 |