org.apache.geronimo.messaging.io
Class AbstractReplacerResolver

java.lang.Object
  extended byorg.apache.geronimo.messaging.io.AbstractReplacerResolver
All Implemented Interfaces:
ReplacerResolver
Direct Known Subclasses:
DeploymentReplacerResolver, InputStreamReplacerResolver, MsgReplacerResolver, NullReplacerResolver, ReferenceReplacerResolver

public abstract class AbstractReplacerResolver
extends Object
implements ReplacerResolver

Base implementation for the ReplacerResolver contracts.

Version:
$Revision: 1.2 $ $Date: 2004/05/27 14:18:13 $

Constructor Summary
AbstractReplacerResolver()
           
 
Method Summary
 ReplacerResolver append(ReplacerResolver anHandler)
          Appends a ReplacerResolver to this instance.
protected abstract  Object customReplaceObject(Object obj)
           
protected abstract  Object customResolveObject(Object obj)
           
 ReplacerResolver getNext()
          Gets the next online element of the chain.
 boolean isOffline()
          Indicates if this instance if online.
 void offline()
          Sets this instance offline.
 void online()
          Sets this instance online.
 Object replaceObject(Object obj)
          Replaces obj with another object.
 Object resolveObject(Object obj)
          Resolves/replaces obj with another object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractReplacerResolver

public AbstractReplacerResolver()
Method Detail

online

public void online()
Description copied from interface: ReplacerResolver
Sets this instance online.
This instance can be added to a chain.

Specified by:
online in interface ReplacerResolver

offline

public void offline()
Description copied from interface: ReplacerResolver
Sets this instance offline.
This instance does no more belong to the chain.

Specified by:
offline in interface ReplacerResolver

isOffline

public boolean isOffline()
Description copied from interface: ReplacerResolver
Indicates if this instance if online.

Specified by:
isOffline in interface ReplacerResolver
Returns:
true if online - it belongs to a chain.

append

public ReplacerResolver append(ReplacerResolver anHandler)
Description copied from interface: ReplacerResolver
Appends a ReplacerResolver to this instance.

Specified by:
append in interface ReplacerResolver
Parameters:
anHandler - Next ReplacerResolver of the chain.
Returns:
aNext.

getNext

public ReplacerResolver getNext()
Description copied from interface: ReplacerResolver
Gets the next online element of the chain.

Specified by:
getNext in interface ReplacerResolver
Returns:
Next element.

replaceObject

public Object replaceObject(Object obj)
                     throws IOException
Description copied from interface: ReplacerResolver
Replaces obj with another object.

Specified by:
replaceObject in interface ReplacerResolver
Parameters:
obj - Object to be replaced.
Returns:
Substitute. If obj is not to be replaced, then obj must be returned.
Throws:
IOException - Indicates an I/O error.

customReplaceObject

protected abstract Object customReplaceObject(Object obj)
                                       throws IOException
Throws:
IOException

resolveObject

public Object resolveObject(Object obj)
                     throws IOException
Description copied from interface: ReplacerResolver
Resolves/replaces obj with another object.

Specified by:
resolveObject in interface ReplacerResolver
Parameters:
obj - Object to be resolved/replaced.
Returns:
Substitute. If obj is not to be replaced, then obj must be returned.
Throws:
IOException - Indicates an I/O error.

customResolveObject

protected abstract Object customResolveObject(Object obj)
                                       throws IOException
Throws:
IOException


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.