net.sourceforge.servletspy.ctx
Class Context

java.lang.Object
  extended bynet.sourceforge.servletspy.ctx.Context
All Implemented Interfaces:
IContext

public final class Context
extends java.lang.Object
implements IContext

Author:
arno schumacher

Constructor Summary
Context(java.lang.String name, java.lang.Object pSubject, IContextHandler[] pTransformers)
          Constructor.
 
Method Summary
 void add(java.lang.String name, java.lang.Object pSubject)
          Asks the engine to do a serialization for the provided subject.
 java.util.Map getIntrospectedMap()
          Returns the map holding the already serialized subjects.
 java.lang.String getName()
          Returns the name of the current serialization task.
 Node getNode()
          Returns the node associated with this context.
 java.lang.Object getSubject()
          Returns the current subject, the object to be serialized.
 java.lang.String getValue()
          Returns the current result of the serialization task.
 void invalidate()
          Invalidates the current context.
 void proceed()
          Passes the serialization task to the next handler.
 void setSubject(java.lang.Object pSubject)
          Replaces the current subject by the provided object.
 void setValue(java.lang.String value)
          Sets the result of the serialization task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context(java.lang.String name,
               java.lang.Object pSubject,
               IContextHandler[] pTransformers)
Constructor.

Parameters:
name - The name of the context.
pSubject - The object to serialize
pTransformers - The chain of transformers responsible for the serialization task.
Method Detail

add

public void add(java.lang.String name,
                java.lang.Object pSubject)
Description copied from interface: IContext
Asks the engine to do a serialization for the provided subject.

Specified by:
add in interface IContext
Parameters:
name - The name of subject
pSubject - The subject to be serialized

getIntrospectedMap

public java.util.Map getIntrospectedMap()
Returns the map holding the already serialized subjects.

Returns:
The map of the already serialized subjects.

getName

public java.lang.String getName()
Description copied from interface: IContext
Returns the name of the current serialization task.

Specified by:
getName in interface IContext
Returns:
The name of the serialization task.

getNode

public Node getNode()
Returns the node associated with this context.

Returns:
The node.

getSubject

public java.lang.Object getSubject()
Description copied from interface: IContext
Returns the current subject, the object to be serialized.

Specified by:
getSubject in interface IContext
Returns:
The subject.

getValue

public java.lang.String getValue()
Description copied from interface: IContext
Returns the current result of the serialization task.

Specified by:
getValue in interface IContext
Returns:
The value

invalidate

public void invalidate()
Description copied from interface: IContext
Invalidates the current context. The current result will not be part of the serialization node graph.

Specified by:
invalidate in interface IContext

proceed

public void proceed()
Description copied from interface: IContext
Passes the serialization task to the next handler.

Specified by:
proceed in interface IContext

setSubject

public void setSubject(java.lang.Object pSubject)
Description copied from interface: IContext
Replaces the current subject by the provided object.

Specified by:
setSubject in interface IContext
Parameters:
pSubject - The new subject.

setValue

public void setValue(java.lang.String value)
Description copied from interface: IContext
Sets the result of the serialization task.

Specified by:
setValue in interface IContext
Parameters:
value - The result


Copyright 2005-2005-2006 Arno Schumacher. All Rights Reserved.