org.apache.wsif.base
Class WSIFDefaultCorrelationService

java.lang.Object
  extended byorg.apache.wsif.base.WSIFDefaultCorrelationService
All Implemented Interfaces:
WSIFCorrelationService

public class WSIFDefaultCorrelationService
extends java.lang.Object
implements WSIFCorrelationService

WSIFDefaultCorrelationService provides a default implementation of a WSIFCorrelationService using a Hashmap as the backing store.

Author:
Ant Elder

Constructor Summary
WSIFDefaultCorrelationService()
          WSIFCorrelationServiceLocator should be used to create a correlation service.
 
Method Summary
 java.io.Serializable get(WSIFCorrelationId id)
          Retrieves an entry (a WSIFOperation) from the correlation service.
 void put(WSIFCorrelationId correlator, java.io.Serializable state, long timeout)
          Adds an entry to the correlation service.
 void remove(WSIFCorrelationId id)
          Removes an entry form the correlation service.
 void shutdown()
          Shutsdown the correlation service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSIFDefaultCorrelationService

public WSIFDefaultCorrelationService()
WSIFCorrelationServiceLocator should be used to create a correlation service.

Method Detail

put

public void put(WSIFCorrelationId correlator,
                java.io.Serializable state,
                long timeout)
         throws WSIFException
Adds an entry to the correlation service.

Specified by:
put in interface WSIFCorrelationService
Parameters:
correlator - the key to associate with the state. This will be a JMS message correlation ID.
state - the state to be stored. This will be a WSIFOperation.
timeout - a timeout period after which the key and associated state will be deleted from the correlation service. A value of zero indicates there should be no timeout.
Throws:
WSIFException

get

public java.io.Serializable get(WSIFCorrelationId id)
                         throws WSIFException
Retrieves an entry (a WSIFOperation) from the correlation service.

Specified by:
get in interface WSIFCorrelationService
Parameters:
id - the key of the state to retrieved
Returns:
the state associated with the id, or null if there is no match for the id.
Throws:
WSIFException

remove

public void remove(WSIFCorrelationId id)
            throws WSIFException
Removes an entry form the correlation service.

Specified by:
remove in interface WSIFCorrelationService
Parameters:
id - the key of entry to be removed
Throws:
WSIFException

shutdown

public void shutdown()
Shutsdown the correlation service.



Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.