javax.rad.server
Interface IServer

All Known Subinterfaces:
IDirectServer
All Known Implementing Classes:
Server

public interface IServer

The IServer interface defines the methods which are necessary for remote server implementations.


Method Summary
 Object createSession(ChangedHashtable<String,Object> pProperties)
          Creates a new session for an application.
 Object createSubSession(Object pSessionId, ChangedHashtable<String,Object> pProperties)
          Creates a sub session of an application.
 void destroySession(Object pSessionId)
          Destroyes a session of an application.
 Object execute(Object pSessionId, String pObjectName, String pMethod, Object... pParams)
          Executes a method call.
 Object executeAction(Object pSessionId, String pAction, Object... pParams)
          Executes an action call.
 void executeActionCallBack(Object pSessionId, Object pCallBackId, String pAction, Object... pParams)
          Executes an asynchronous action call.
 void executeCallBack(Object pSessionId, Object pCallBackId, String pObjectName, String pMethod, Object... pParams)
          Executes an asynchronous method call.
 List<ResultObject> getCallBackResults(Object pSessionId)
          Returns all available objects of an asynchronous execution.
 AbstractObjectProvider getObjectProvider()
          Gets the AbstractObjectProvider.
 ChangedHashtable<String,Object> getProperties(Object pSessionId)
          Gets all session properties.
 Object getProperty(Object pSessionId, String pName)
          Gets the value of a session property.
 AbstractSessionManager getSessionManager()
          Gets the AbstractSessionManager.
 Object[] setAndCheckAlive(Object pSessionId, Object... pSubSessionId)
          Sets the alive state for a session and validates the alive state of sub sessions.
 void setNewPassword(Object pSessionId, String pOldPassword, String pNewPassword)
          Sets a new password for the user of a session.
 void setProperty(Object pSessionId, String pName, Object pValue)
          Sets a session property.
 

Method Detail

getObjectProvider

AbstractObjectProvider getObjectProvider()
Gets the AbstractObjectProvider.

Returns:
the object provider.

getSessionManager

AbstractSessionManager getSessionManager()
Gets the AbstractSessionManager.

Returns:
the session manager.

createSession

Object createSession(ChangedHashtable<String,Object> pProperties)
                     throws Throwable
Creates a new session for an application. The credentials are stored in the properties.

Parameters:
pProperties - the initial session properties
Returns:
session identifier of newly created Session
Throws:
Throwable - if the session can not be created

createSubSession

Object createSubSession(Object pSessionId,
                        ChangedHashtable<String,Object> pProperties)
                        throws Throwable
Creates a sub session of an application. The name/alias of the sub session is stored in the properties.

Parameters:
pSessionId - session identifier
pProperties - the initial session properties
Returns:
session identifier of newly created SubSession
Throws:
Throwable - if the session can not be created

destroySession

void destroySession(Object pSessionId)
Destroyes a session of an application.

Parameters:
pSessionId - session identifier

execute

Object execute(Object pSessionId,
               String pObjectName,
               String pMethod,
               Object... pParams)
               throws Throwable
Executes a method call.

Parameters:
pSessionId - session identifier
pObjectName - server object name/alias
pMethod - method name which should be called
pParams - parameters for the method call
Returns:
result of method call
Throws:
Throwable - if an error occurs during execution

executeCallBack

void executeCallBack(Object pSessionId,
                     Object pCallBackId,
                     String pObjectName,
                     String pMethod,
                     Object... pParams)
                     throws Throwable
Executes an asynchronous method call.

Parameters:
pSessionId - session identifier
pCallBackId - the callback identifier
pObjectName - server object name/alias
pMethod - method name which should be called
pParams - parameters for the method call
Throws:
Throwable - if an error occurs during execution

executeAction

Object executeAction(Object pSessionId,
                     String pAction,
                     Object... pParams)
                     throws Throwable
Executes an action call.

Parameters:
pSessionId - session identifier
pAction - action which should be called
pParams - parameters for the action call
Returns:
result of action call
Throws:
Throwable - if an error occurs during execution

executeActionCallBack

void executeActionCallBack(Object pSessionId,
                           Object pCallBackId,
                           String pAction,
                           Object... pParams)
                           throws Throwable
Executes an asynchronous action call.

Parameters:
pSessionId - session identifier
pCallBackId - the callback identifier
pAction - action which should be called
pParams - parameters for the action call
Throws:
Throwable - if an error occurs during execution

getCallBackResults

List<ResultObject> getCallBackResults(Object pSessionId)
                                      throws Throwable
Returns all available objects of an asynchronous execution.

Parameters:
pSessionId - session identifier
Returns:
result objects or null if there are no result objects
Throws:
Throwable - if an error occurs during execution

setProperty

void setProperty(Object pSessionId,
                 String pName,
                 Object pValue)
                 throws Throwable
Sets a session property.

Parameters:
pSessionId - the session identifier
pName - the property name
pValue - the value of the property or null to delete the property
Throws:
Throwable - if an error occurs during execution

getProperty

Object getProperty(Object pSessionId,
                   String pName)
                   throws Throwable
Gets the value of a session property.

Parameters:
pSessionId - the session identifier
pName - the property name
Returns:
the value of the property or null if the property is not available
Throws:
Throwable - if an error occurs during execution

getProperties

ChangedHashtable<String,Object> getProperties(Object pSessionId)
                                              throws Throwable
Gets all session properties.

Parameters:
pSessionId - the session identifier
Returns:
a ChangedHashtable with property names and values
Throws:
Throwable - if an error occurs during execution

setAndCheckAlive

Object[] setAndCheckAlive(Object pSessionId,
                          Object... pSubSessionId)
                          throws Throwable
Sets the alive state for a session and validates the alive state of sub sessions.

Parameters:
pSessionId - the session id
pSubSessionId - the sub session ids
Returns:
the invalid/expired sub session ids
Throws:
Throwable - if an error occurs during execution

setNewPassword

void setNewPassword(Object pSessionId,
                    String pOldPassword,
                    String pNewPassword)
                    throws Throwable
Sets a new password for the user of a session.

Parameters:
pSessionId - the session id
pOldPassword - the old password
pNewPassword - the new password
Throws:
Throwable - if an error occurs during execution


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.