Package com.zeroc.Glacier2
Class SessionHelper
java.lang.Object
com.zeroc.Glacier2.SessionHelper
A helper class for using Glacier2 with GUI applications.
-
Method Summary
Modifier and TypeMethodDescriptioncom.zeroc.Ice.ObjectPrxaddWithUUID(com.zeroc.Ice.Object servant) Adds a servant to the callback object adapter's Active Servant Map with a UUID.Returns the category to be used in the identities of all of the client's callback objects.com.zeroc.Ice.CommunicatorReturns the session's communicator object.protected voidprotected voidvoiddestroy()Destroys the Glacier2 session.booleanReturns true if there is an active session, otherwise returns false.com.zeroc.Ice.ObjectAdapterCreates an object adapter for callback objects.session()Returns the Glacier2 session proxy, or null if the session hasn't been established yet or the session has already been destroyed.
-
Method Details
-
destroy
public void destroy()Destroys the Glacier2 session. Once the session has been destroyed,SessionCallback.disconnected(com.zeroc.Glacier2.SessionHelper)is called on the associated callback object. -
communicator
public com.zeroc.Ice.Communicator communicator()Returns the session's communicator object.- Returns:
- The communicator.
-
categoryForClient
Returns the category to be used in the identities of all of the client's callback objects. Clients must use this category for the router to forward callback requests to the intended client.- Returns:
- The category.
- Throws:
SessionNotExistException- No session exists.
-
addWithUUID
public com.zeroc.Ice.ObjectPrx addWithUUID(com.zeroc.Ice.Object servant) throws SessionNotExistException Adds a servant to the callback object adapter's Active Servant Map with a UUID.- Parameters:
servant- The servant to add.- Returns:
- The proxy for the servant.
- Throws:
SessionNotExistException- No session exists.
-
session
Returns the Glacier2 session proxy, or null if the session hasn't been established yet or the session has already been destroyed.- Returns:
- The session proxy, or null if no session exists.
-
isConnected
public boolean isConnected()Returns true if there is an active session, otherwise returns false.- Returns:
trueif session exists or false if no session exists.
-
objectAdapter
Creates an object adapter for callback objects.- Returns:
- The object adapter.
- Throws:
SessionNotExistException- No session exists.
-
connect
-
connect
-