net.xoetrope.optional.service
Class ServiceContext

java.lang.Object
  extended by net.xoetrope.optional.service.ServiceContext

public class ServiceContext
extends java.lang.Object

Context object to be passed through routes as a way to pass and return parameters. Errors are also stored and should be checked by each ServiceProxy in the services route.


Constructor Summary
ServiceContext()
          Creates a new instance of ServiceContext
 
Method Summary
 void addError(java.lang.String error)
          Adds an error to the errors Vector in the ServiceProxyArgs instance
 ServiceProxyArgs getArgs()
          Retrieve the ServiceProxyArgs for this instance
 java.util.Vector getErrors()
          Retrieve the errors Vector
 java.util.Hashtable getPassArgs()
          Retrieve the pass arguments Hashtable
 java.util.Hashtable getReturnArgs()
          Retrieve the return arguments Hashtable
 boolean hasErrors()
          If the errors hashtable has any entries then an error has been generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceContext

public ServiceContext()
Creates a new instance of ServiceContext

Method Detail

getArgs

public ServiceProxyArgs getArgs()
Retrieve the ServiceProxyArgs for this instance

Returns:
The ServiceProxyArgs

getPassArgs

public java.util.Hashtable getPassArgs()
Retrieve the pass arguments Hashtable

Returns:
The Hashtable of pass arguments

getReturnArgs

public java.util.Hashtable getReturnArgs()
Retrieve the return arguments Hashtable

Returns:
The Hashtable of return arguments

getErrors

public java.util.Vector getErrors()
Retrieve the errors Vector

Returns:
the error hashtable

hasErrors

public boolean hasErrors()
If the errors hashtable has any entries then an error has been generated.

Returns:
boolean indicating whether or not errors have been generated.

addError

public void addError(java.lang.String error)
Adds an error to the errors Vector in the ServiceProxyArgs instance

Parameters:
error - The error to be added