org.ogf.saga.session
Interface Session

All Superinterfaces:
Cloneable, SagaObject

public interface Session
extends SagaObject

A session isolates independent sets of SAGA objects from each other, and supports management of security contexts.


Field Summary
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Method Summary
 void addContext(Context context)
          Attaches a deep copy of the specified security context to the session.
 void close()
          Closes a SAGA session.
 void close(float timeoutInSeconds)
          Closes a SAGA session.
 Context[] listContexts()
          Retrieves all contexts attached to the session.
 void removeContext(Context context)
          Detaches the specified security context from the session.
 
Methods inherited from interface org.ogf.saga.SagaObject
clone, getId, getSession
 

Method Detail

addContext

void addContext(Context context)
                throws NoSuccessException,
                       TimeoutException
Attaches a deep copy of the specified security context to the session.

Parameters:
context - the context to be added.
Throws:
NoSuccessException - is thrown when the implementation is not able to initialize the context, and cannot use the context as-is.
TimeoutException - is thrown if the context initialization implies a remote operation, and that operation times out.

removeContext

void removeContext(Context context)
                   throws DoesNotExistException
Detaches the specified security context from the session.

Parameters:
context - the context to be removed.
Throws:
DoesNotExistException - is thrown when the session does not contain the specified context.

listContexts

Context[] listContexts()
Retrieves all contexts attached to the session. An empty array is returned if no context is attached. The contexts in the returned list are deep copies of the session's context.

Returns:
a list of contexts.

close

void close()
Closes a SAGA session. Deviation from the SAGA API, which does not have this method. However, middleware may for instance have threads which may need to be terminated, or the application will hang. This may not be the right place for it, but there is no other place ...


close

void close(float timeoutInSeconds)
Closes a SAGA session. Deviation from the SAGA API, which does not have this method. However, middleware may for instance have threads which may need to be terminated, or the application will hang.

Parameters:
timeoutInSeconds - the timeout in seconds.


Copyright © 2014 Open Grid Forum. All rights reserved.