|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.mds.aggregator.impl.PollingAggregatorSource
An AggregatorSource which generates data using synchronous polling in a background thread. The class is abstract, and requires subclassing to provide the implementation of the poll action.
| Nested Class Summary | |
class |
PollingAggregatorSource.QueryTimerListener
One instance of this class will be created for each aggregation |
| Field Summary | |
static int |
DEFAULT_POLL_INTERVAL
|
private boolean |
initialized
|
private static org.apache.commons.logging.Log |
logger
|
private java.util.Hashtable |
sessions
This Map maps from session keys (String instances) to session context (QueryTimerListener instances) |
private AggregatorSink |
sink
|
private java.lang.Object |
sinkParameters
|
private TimerManagerImpl |
timerManager
|
| Constructor Summary | |
PollingAggregatorSource(AggregatorSink sink)
|
|
PollingAggregatorSource(AggregatorSink sink,
java.lang.Object sinkParameters)
Creates a new instance of PollingAggregatorSource |
|
| Method Summary | |
java.lang.String |
addAggregation(java.lang.Object parameters,
AggregatorServiceGroupEntryResource entry)
Establishes an implementation-specific data aggregation session. |
abstract AggregatorPollType |
deserializeParameter(org.apache.axis.message.MessageElement m)
If the supplied message element is a supported parameter block, the deserialised form should be returned; otherwise null should be returned. |
AggregatorSink |
getAggregatorSink()
Gets the AggregatorSink instance where data from the underlying AggregatorSource will be routed, or NULL if not set. |
AggregatorServiceGroupEntryResource |
getSessionContext(java.lang.String sessionKey)
Retrieve AggregatorServiceGroupEntryResource entry context. |
java.lang.String |
getSessionKey(AggregatorServiceGroupEntryResource entry)
Get a sessionKey from a given entry context. |
void |
initialize(java.lang.Object parameters)
Called to initialize any necessary state. |
boolean |
isValidSession(java.lang.String sessionKey)
Determines if a specified sessionKey is valid (active). |
abstract org.apache.axis.encoding.AnyContentType |
poll(AggregatorPollType parameters,
org.apache.axis.message.addressing.EndpointReferenceType epr,
AggregatorConfig config)
This method must be implemented by subclasses to provide the specific specialised poll implementation. |
void |
removeAggregation(java.lang.String sessionKey)
Terminates the data aggregation represented by sessionKey. |
void |
setAggregatorSink(AggregatorSink sink,
java.lang.Object sinkParameters)
Sets the AggregatorSink instance where data from the Aggregator Source will be routed. |
void |
terminate()
Called to free resources used by the source. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_POLL_INTERVAL
private AggregatorSink sink
private java.lang.Object sinkParameters
private java.util.Hashtable sessions
private TimerManagerImpl timerManager
private boolean initialized
private static org.apache.commons.logging.Log logger
| Constructor Detail |
public PollingAggregatorSource(AggregatorSink sink,
java.lang.Object sinkParameters)
public PollingAggregatorSource(AggregatorSink sink)
| Method Detail |
public void initialize(java.lang.Object parameters)
throws AggregatorException,
java.lang.Exception
AggregatorSource
initialize in interface AggregatorSourceAggregatorException
java.lang.Exceptionpublic AggregatorServiceGroupEntryResource getSessionContext(java.lang.String sessionKey)
AggregatorSource
getSessionContext in interface AggregatorSourcesessionKey - The session key of the aggregation.
public java.lang.String getSessionKey(AggregatorServiceGroupEntryResource entry)
throws AggregatorException
AggregatorSource
getSessionKey in interface AggregatorSourceAggregatorException
public boolean isValidSession(java.lang.String sessionKey)
throws AggregatorException
AggregatorSource
isValidSession in interface AggregatorSourceAggregatorExceptionpublic AggregatorSink getAggregatorSink()
AggregatorSource
getAggregatorSink in interface AggregatorSource
public void setAggregatorSink(AggregatorSink sink,
java.lang.Object sinkParameters)
AggregatorSource
setAggregatorSink in interface AggregatorSource
public java.lang.String addAggregation(java.lang.Object parameters,
AggregatorServiceGroupEntryResource entry)
throws AggregatorParamTypeNotSupportedException,
AggregatorException,
java.lang.Exception
AggregatorSource
addAggregation in interface AggregatorSourceparameters - Implementation-specific parameters of the data to be
collected.entry - The AggregatorServiceGroupEntryResource instance to
associate with this aggregation session. This instance will be passed
unmodified to any connected AggregationSink.
AggregatorParamTypeNotSupportedException
AggregatorException
java.lang.Exception
public void removeAggregation(java.lang.String sessionKey)
throws AggregatorException,
java.lang.Exception
AggregatorSource
removeAggregation in interface AggregatorSourcesessionKey - The session key of the aggregation to terminate.
AggregatorException
java.lang.Exceptionpublic void terminate()
AggregatorSource
terminate in interface AggregatorSource
public abstract org.apache.axis.encoding.AnyContentType poll(AggregatorPollType parameters,
org.apache.axis.message.addressing.EndpointReferenceType epr,
AggregatorConfig config)
public abstract AggregatorPollType deserializeParameter(org.apache.axis.message.MessageElement m)
throws DeserializationException
DeserializationException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||