org.globus.ogsa.impl.base.aggregator
Interface DataAggregationSource

All Known Implementing Classes:
SubscriptionAggregationSource

public interface DataAggregationSource

This interface handles session management for establishing data aggregation relationships between grid services. The exact data-interchange method is abstracted in order to provide an extensibility mechanism. For example, the underlying session may represented by an asynchronous notification channel (e.g. OGSA subscription), a synchronous polling mechanism (e.g. repeated FindServiceData queries) or some other mechanism, such as a command buffer or FIFO.


Method Summary
 java.lang.String addDataAggregation(DataAggregationType dataAggregation)
          Delegated call made by the DataAggregatorManager's addDataAggregation method to allow an underlying DataAggregationSource to establish an implementation specific data aggregation relationship with a target grid service.
 java.lang.Object getSessionContext(java.lang.String sessionID)
          Retrieve implementation-specific session context.
 java.lang.String getSessionID(java.lang.Object context)
          Get a sessionID from a given context.
 void initialize(org.globus.ogsa.GridServiceBase serviceBase)
          Called after the aggregator manager has initialized itself, to give the DataAggregationSource a chance to initialize necessary state.
 boolean isValidSession(java.lang.String sessionID)
          Determines if a specified sessionID is valid (active).
 void removeDataAggregation(java.lang.String sessionID)
          Terminates the data aggregation relationship represented by sessionID.
 void setSessionContext(java.lang.String sessionID, java.lang.Object context)
          Associate an implementation-specific session context with a sessionID.
 void terminate()
          Called when the aggregator manager has been asked to shut down, before the manager executes its own termination code.
 

Method Detail

initialize

public void initialize(org.globus.ogsa.GridServiceBase serviceBase)
                throws org.globus.ogsa.GridServiceException
Called after the aggregator manager has initialized itself, to give the DataAggregationSource a chance to initialize necessary state.

Parameters:
serviceBase - An implmentation may or may not register its instance using setProperty() on the serviceBase parameter.
Throws:
org.globus.ogsa.GridServiceException

terminate

public void terminate()
Called when the aggregator manager has been asked to shut down, before the manager executes its own termination code.


addDataAggregation

public java.lang.String addDataAggregation(DataAggregationType dataAggregation)
                                    throws org.globus.ogsa.GridServiceException
Delegated call made by the DataAggregatorManager's addDataAggregation method to allow an underlying DataAggregationSource to establish an implementation specific data aggregation relationship with a target grid service.

Parameters:
dataAggregation - Implementation-specific parameters of the data to be collected.
Returns:
A String object which must be guaranteed by the underlying implementation to be a unique token with respect to all other invocataions of the addDataAggregation method with the same parameters on the same DataAggregationSource instance.
Throws:
org.globus.ogsa.GridServiceException

removeDataAggregation

public void removeDataAggregation(java.lang.String sessionID)
                           throws org.globus.ogsa.GridServiceException
Terminates the data aggregation relationship represented by sessionID.

Parameters:
sessionID - The session ID of the aggregation relationship to terminate.
Throws:
org.globus.ogsa.GridServiceException

getSessionContext

public java.lang.Object getSessionContext(java.lang.String sessionID)
Retrieve implementation-specific session context.

Parameters:
sessionID - The session ID of the aggregation relationship.
Returns:
A valid object, or NULL. The type of object returned is dependent on the underlying implementation.

setSessionContext

public void setSessionContext(java.lang.String sessionID,
                              java.lang.Object context)
                       throws java.lang.Exception
Associate an implementation-specific session context with a sessionID. Note that the underlying implementation may choose to not permit this action (or only permit it under certain conditions) and may instead throw an exception.

Parameters:
sessionID - The session ID that is to be associated with the context.
context - The context to associate.
Throws:
java.lang.Exception

getSessionID

public java.lang.String getSessionID(java.lang.Object context)
                              throws java.lang.Exception
Get a sessionID from a given context. Note that the underlying type of the context parameter is implementation specific.

Returns:
A string representing the sessionID for the given context.
Throws:
java.lang.Exception

isValidSession

public boolean isValidSession(java.lang.String sessionID)
                       throws java.lang.Exception
Determines if a specified sessionID is valid (active).

Returns:
A boolean value indicating whether the specified sessionID is valid.
Throws:
java.lang.Exception