Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.api
Class RpcContext

java.lang.Object
  extended by org.jboss.errai.bus.server.api.RpcContext

public class RpcContext
extends Object

This utility provides access to Message resources otherwise not visible to RPC endpoints. It can be used to gain access to HTTP session and servlet request objects.

Author:
Christian Sadilek , Mike Brock

Constructor Summary
RpcContext()
           
 
Method Summary
static javax.servlet.http.HttpSession getHttpSession()
           
static Message getMessage()
           
static QueueSession getQueueSession()
           
static javax.servlet.ServletRequest getServletRequest()
           
static void remove()
          Removes the resources associated with the current thread.
static void set(Message message)
          Reads resources from the provided Message and stores them in ThreadLocals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcContext

public RpcContext()
Method Detail

set

public static void set(Message message)
Reads resources from the provided Message and stores them in ThreadLocals.

Parameters:
message -

remove

public static void remove()
Removes the resources associated with the current thread.


getMessage

public static Message getMessage()

getQueueSession

public static QueueSession getQueueSession()
Returns:
the QueueSession associated with this Thread

getHttpSession

public static javax.servlet.http.HttpSession getHttpSession()
Returns:
the HTTP session object associated with this Thread

getServletRequest

public static javax.servlet.ServletRequest getServletRequest()
Returns:
the servlet request instance associated with this Thread

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.