|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.thetransactioncompany.jsonrpc2.server.MessageContext
public class MessageContext
Context information about JSON-RPC 2.0 request and notification messages.
| Nested Class Summary | |
|---|---|
class |
MessageContext.BasicPrincipal
Minimal implementation of the Principal
interface. |
| Constructor Summary | |
|---|---|
MessageContext(javax.servlet.http.HttpServletRequest httpRequest)
Creates a new JSON-RPC 2.0 request / notification context from the specified HTTP request. |
|
MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress)
Creates a new JSON-RPC 2.0 request / notification context. |
|
MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure)
Creates a new JSON-RPC 2.0 request / notification context. |
|
MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure,
java.lang.String principalName)
Creates a new JSON-RPC 2.0 request / notification context. |
|
MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure,
java.lang.String[] principalNames)
Creates a new JSON-RPC 2.0 request / notification context. |
|
| Method Summary | |
|---|---|
java.lang.String |
getClientHostName()
Gets the host name of the client that sent the request / notification. |
java.lang.String |
getClientInetAddress()
Gets the IP address of the client that sent the request / notification. |
java.security.Principal |
getPrincipal()
Returns the first authenticated client principal, null if
none. |
java.lang.String |
getPrincipalName()
Returns the first authenticated client principal name, null
if none. |
java.lang.String[] |
getPrincipalNames()
Returns the authenticated client principal names, null
if none. |
java.security.Principal[] |
getPrincipals()
Returns the authenticated client principals, null if
none. |
boolean |
isSecure()
Indicates whether the request / notification was received over a secure HTTPS connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure,
java.lang.String principalName)
clientHostName - The client host name, null if
unknown.clientInetAddress - The client IP address, null if
unknown.secure - Specifies a request received over HTTPS.principalName - Specifies the authenticated client principle
name, null if unknown. The name must
not be an empty or blank string.
public MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure,
java.lang.String[] principalNames)
clientHostName - The client host name, null if
unknown.clientInetAddress - The client IP address, null if
unknown.secure - Specifies a request received over HTTPS.principalNames - Specifies the authenticated client principle
names, null if unknown. The names
must not be an empty or blank string.
public MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress,
boolean secure)
clientHostName - The client host name, null if
unknown.clientInetAddress - The client IP address, null if
unknown.secure - Specifies a request received over HTTPS.
public MessageContext(java.lang.String clientHostName,
java.lang.String clientInetAddress)
clientHostName - The client host name, null if
unknown.clientInetAddress - The client IP address, null if
unknown.public MessageContext(javax.servlet.http.HttpServletRequest httpRequest)
httpRequest - The HTTP request.| Method Detail |
|---|
public java.lang.String getClientHostName()
null if unknown.public java.lang.String getClientInetAddress()
null if unknown.public boolean isSecure()
true If the request was received over HTTPS,
false if it was received over plain HTTP.public java.security.Principal getPrincipal()
null if
none.
null if none.public java.security.Principal[] getPrincipals()
null if
none.
null if none.public java.lang.String getPrincipalName()
null
if none.
null if none.public java.lang.String[] getPrincipalNames()
null
if none.
null if none.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||