|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BayeuxContext
The Bayeux Context provides information about the current context of a Bayeux message.
This information may be from an associated HTTP request, or a HTTP request used to originally establish the connection (for example in a websocket handshake).
| Method Summary | |
|---|---|
Object |
getContextAttribute(String name)
Access the ServletContext (if any) attributes. |
String |
getContextInitParameter(String name)
Access the ServletContext (if any) init parameter. |
String |
getCookie(String name)
Get a transport cookie. |
String |
getHeader(String name)
Get a transport header. |
List<String> |
getHeaderValues(String name)
Get a multi valued transport header. |
Object |
getHttpSessionAttribute(String name)
Access the HTTP Session (if any) attributes. |
String |
getHttpSessionId()
Access the HTTP Session (if any) ID. |
InetSocketAddress |
getLocalAddress()
|
String |
getParameter(String name)
Get a transport parameter. |
List<String> |
getParameterValues(String name)
Get a multi valued transport parameter. |
InetSocketAddress |
getRemoteAddress()
|
Object |
getRequestAttribute(String name)
Access the Request (if any) attributes. |
String |
getURL()
|
Principal |
getUserPrincipal()
|
void |
invalidateHttpSession()
Invalidate the HTTP Session. |
boolean |
isUserInRole(String role)
|
void |
setHttpSessionAttribute(String name,
Object value)
Access the HTTP Session (if any) attributes. |
| Method Detail |
|---|
Principal getUserPrincipal()
boolean isUserInRole(String role)
role - the role to check whether the user belongs to
InetSocketAddress getRemoteAddress()
InetSocketAddress getLocalAddress()
String getHeader(String name)
Get a header for any current transport mechanism (eg HTTP request). For transports like websocket, the header may be from the initial handshake.
name - The name of the header
List<String> getHeaderValues(String name)
Get a header for any current transport mechanism (eg HTTP request). For transports like websocket, the header may be from the initial handshake.
name - The name of the header
String getParameter(String name)
Get a parameter for any current transport mechanism (eg HTTP request). For transports like websocket, the parameter may be from the initial handshake.
name - The name of the parameter
List<String> getParameterValues(String name)
Get a parameter for any current transport mechanism (eg HTTP request). For transports like websocket, the parameter may be from the initial handshake.
name - The name of the parameter
String getCookie(String name)
Get a cookie for any current transport mechanism (eg HTTP request). For transports like websocket, the cookie may be from the initial handshake.
name - The name of the cookie
String getHttpSessionId()
Session.getId() should be used in preference to the HTTP Session.
Object getHttpSessionAttribute(String name)
Session.getAttribute(String) should be used in preference to the HTTP Session.
name - the attribute name
void setHttpSessionAttribute(String name,
Object value)
Session.setAttribute(String, Object) should be used in preference to the HTTP Session.
name - the attribute namevalue - the attribute valuevoid invalidateHttpSession()
Session.getId() should be used in preference to the HTTP Session.
Object getRequestAttribute(String name)
name - the attribute name
Object getContextAttribute(String name)
name - the attribute name
String getContextInitParameter(String name)
name - the init parameter name
String getURL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||