org.jibx.ws.context
Class Context

java.lang.Object
  extended by org.jibx.ws.context.Context
Direct Known Subclasses:
ExchangeContext, MessageContext

public abstract class Context
extends Object

Provides functionality common to all Context classes.


Constructor Summary
Context()
           
 
Method Summary
 Object getAttribute(String name)
          Returns the object associated with the given attribute name in this context.
 Set getAttributeNames()
          Returns the names of all attributes in this context.
 void removeAttribute(String name)
          Removes the attribute with the given name from this context.
 void reset()
          Resets the state of this context, so that it can be reused by a subsequent message exchange.
 void setAttribute(String name, Object value)
          Binds an object to a given attribute name in this context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Method Detail

getAttribute

public final Object getAttribute(String name)
Returns the object associated with the given attribute name in this context. Returns null if no attribute exists by the given name.

Parameters:
name - the name of the attribute
Returns:
the object associated with the attribute name, or null if no attribute exists matching the given name

getAttributeNames

public final Set getAttributeNames()
Returns the names of all attributes in this context. Returns an empty set if no attributes exist.

Returns:
a set of Strings of all attributes names.

removeAttribute

public final void removeAttribute(String name)
Removes the attribute with the given name from this context. Subsequent calls to getAttribute(String) for this name will return null.

Parameters:
name - the name of the attribute to be removed

setAttribute

public final void setAttribute(String name,
                               Object value)
Binds an object to a given attribute name in this context.

Parameters:
name - the name of the attribute to add
value - the object to associate with this attribute name

reset

public void reset()
Resets the state of this context, so that it can be reused by a subsequent message exchange.



Project Web Site