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 TypeMethodDescriptionaddWithUUID
(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.Returns the session's communicator object.protected void
protected void
void
destroy()
Destroys the Glacier2 session.boolean
Returns true if there is an active session, otherwise returns false.Creates 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
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
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:
true
if 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
-