org.jboss.security.xacml.core
Class JBossRequestContext

java.lang.Object
  extended by org.jboss.security.xacml.core.JBossRequestContext
All Implemented Interfaces:
ContextMapOp, ElementMappingType, RequestContext

public class JBossRequestContext
extends Object
implements RequestContext

Implementation of the RequestContext interface

Since:
Jul 6, 2007
Version:
$Revision$
Author:
Anil.Saldhana@redhat.com

Constructor Summary
JBossRequestContext()
           
 
Method Summary
 Element asElement(Document root)
          Return a new Element given the owner document
<T> T
get(String key)
          Get an element from the map
 Node getDocumentElement()
          Return the element of the document from where the request was created if available Null if no parsing was involved
 void marshall(OutputStream os)
          Marshall the request context onto an Output Stream
 void readRequest(InputStream is)
          Read the Request from a stream
 void readRequest(Node node)
          Read a preparsed Node
<T> void
set(String key, T obj)
          Set an object on the map
 void setRequest(RequestType requestType)
          Place the Request instance on the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossRequestContext

public JBossRequestContext()
Method Detail

get

public <T> T get(String key)
Description copied from interface: ContextMapOp
Get an element from the map

Specified by:
get in interface ContextMapOp
Type Parameters:
T - object from the map
Parameters:
key - Key
Returns:
object from the map
See Also:
ContextMapOp.get(String)

set

public <T> void set(String key,
                    T obj)
Description copied from interface: ContextMapOp
Set an object on the map

Specified by:
set in interface ContextMapOp
Parameters:
key - Key for the map
obj - Object to be placed
See Also:
ContextMapOp.set(String, Object)

getDocumentElement

public Node getDocumentElement()
Description copied from interface: RequestContext
Return the element of the document from where the request was created if available Null if no parsing was involved

Specified by:
getDocumentElement in interface RequestContext
Returns:
See Also:
RequestContext.getDocumentElement()

setRequest

public void setRequest(RequestType requestType)
                throws IOException
Description copied from interface: RequestContext
Place the Request instance on the context

Specified by:
setRequest in interface RequestContext
Parameters:
requestType - An instance of RequestType
Throws:
IOException
See Also:
RequestContext.setRequest(RequestType)

readRequest

public void readRequest(InputStream is)
                 throws IOException
Description copied from interface: RequestContext
Read the Request from a stream

Specified by:
readRequest in interface RequestContext
Parameters:
is - InputStream for the request
Throws:
IOException
See Also:
RequestContext.readRequest(InputStream)

readRequest

public void readRequest(Node node)
                 throws IOException
Description copied from interface: RequestContext
Read a preparsed Node

Specified by:
readRequest in interface RequestContext
Throws:
IOException
See Also:
RequestContext.readRequest(Node)

marshall

public void marshall(OutputStream os)
              throws IOException
Description copied from interface: RequestContext
Marshall the request context onto an Output Stream

Specified by:
marshall in interface RequestContext
Parameters:
os - OutputStream (System.out, ByteArrayOutputStream etc)
Throws:
IOException
See Also:
RequestContext.marshall(OutputStream)

asElement

public Element asElement(Document root)
Description copied from interface: ElementMappingType
Return a new Element given the owner document

Specified by:
asElement in interface ElementMappingType
Returns:
See Also:
ElementMappingType#asElement(Document)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.