org.apache.wink.common
Interface RuntimeContext

All Known Subinterfaces:
MessageContext

public interface RuntimeContext


Method Summary
<T> T
getAttribute(java.lang.Class<T> type)
          Convenience method for getting an attribute whose key that is the fully qualified name of a class
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Get an attributes map to store objects in the context of a request.
 javax.ws.rs.core.HttpHeaders getHttpHeaders()
          Get the HttpHeaders context
 java.io.InputStream getInputStream()
          Get the input stream of the request
 java.io.OutputStream getOutputStream()
          Get the output stream of the response
 javax.ws.rs.ext.Providers getProviders()
          Get the Providers context
 javax.ws.rs.core.Request getRequest()
          Get the Request context
 javax.ws.rs.core.SecurityContext getSecurityContext()
          Get the SecurityContext context
 javax.ws.rs.core.UriInfo getUriInfo()
          Get the UriInfo context
<T> void
setAttribute(java.lang.Class<T> type, T object)
          Convenience method for setting an attribute whose key that is the fully qualified name of a class
 

Method Detail

getProviders

javax.ws.rs.ext.Providers getProviders()
Get the Providers context

Returns:
the Providers context

getHttpHeaders

javax.ws.rs.core.HttpHeaders getHttpHeaders()
Get the HttpHeaders context

Returns:
the HttpHeaders context

getUriInfo

javax.ws.rs.core.UriInfo getUriInfo()
Get the UriInfo context

Returns:
the UriInfo context

getSecurityContext

javax.ws.rs.core.SecurityContext getSecurityContext()
Get the SecurityContext context

Returns:
the SecurityContext context

getRequest

javax.ws.rs.core.Request getRequest()
Get the Request context

Returns:
the Request context

getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the input stream of the request

Returns:
the request input stream
Throws:
java.io.IOException

getOutputStream

java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the output stream of the response

Returns:
the response output stream
Throws:
java.io.IOException

getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Get an attributes map to store objects in the context of a request.

Returns:
a live map of attributes

setAttribute

<T> void setAttribute(java.lang.Class<T> type,
                      T object)
Convenience method for setting an attribute whose key that is the fully qualified name of a class

Type Parameters:
T - attribute type
Parameters:
type - the class of the key whose fully qualified name is used as the key
object - the object to set

getAttribute

<T> T getAttribute(java.lang.Class<T> type)
Convenience method for getting an attribute whose key that is the fully qualified name of a class

Type Parameters:
T - attribute type
Parameters:
type - he class of the key whose fully qualified name is used as the key
Returns:
the attribute or null


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.