Package com.opencloud.slee.rest.common
Interface RestRequest
-
@SleeEvent(id=@ComponentId(name="@request.event.name@.GET",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.POST",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.PUT",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.DELETE",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.OPTIONS",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.HEAD",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.PATCH",vendor="@component.vendor@",version="@component.version@")) @SleeEvent(id=@ComponentId(name="@request.event.name@.TRACE",vendor="@component.vendor@",version="@component.version@")) public interface RestRequestThe standard SLEE events, corresponding to incoming REST requests, defined by the built-in REST API provided by a REST RA.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetAddressgetClientAddress()Returns the address of the HTTP client (for incoming requests).java.security.cert.Certificate[]getClientCertificates()Returns the certificates sent by the HTTP client (for incoming HTTPS requests that used client certificate authentication).byte[]getContent()Get the message's content, as a byte array.intgetContentLength()Get the message's Content-Length.java.lang.StringgetContentType()Get the message's Content-Type header.java.lang.StringgetHeader(java.lang.String name)Get the value of a HTTP header.java.util.Iterator<java.lang.String>getHeaderNames()Get an iterator returning a String for each header present in this message.java.net.InetAddressgetLocalAddress()Return the local address of the HTTP server that the client is connected to (for incoming requests).java.net.URIgetRequestURI()Get the Request-URI specified in the Request-Line of the HTTP request, as defined in section 5.1.2 of RFC 2616.java.net.URLgetRequestURL()Get the request URL of this request, including the host.com.opencloud.rhino.facilities.sas.TrailgetTrail()HttpMethodmethod()Get the HTTP request method of this request.
-
-
-
Method Detail
-
method
HttpMethod method()
Get the HTTP request method of this request.- Returns:
- the method (GET, POST, etc)
-
getRequestURL
java.net.URL getRequestURL()
Get the request URL of this request, including the host.To get the raw Request-URI as specified in the Request-Line of the request, use
getRequestURI()instead.- Returns:
- the request URL, including host
-
getRequestURI
java.net.URI getRequestURI()
Get the Request-URI specified in the Request-Line of the HTTP request, as defined in section 5.1.2 of RFC 2616. Note that this may be an absolute URI, or just a path.Only set for incoming requests.
To get the URL form which includes the host, use
getRequestURL()instead.- Returns:
- The Request-URI of the request
-
getHeader
java.lang.String getHeader(java.lang.String name)
Get the value of a HTTP header.- Parameters:
name- the header name (case insensitive)- Returns:
- the header's value, or null if the header is not present
-
getHeaderNames
java.util.Iterator<java.lang.String> getHeaderNames()
Get an iterator returning a String for each header present in this message. The returned iterator may be invalidated if the message's headers are modified.- Returns:
- an Iterator instance
-
getContent
byte[] getContent()
Get the message's content, as a byte array.If this message is immutable, a new copy of the content is returned; otherwise, the returned array may optionally be backed by the actual content.
Calling this method may cause a shared message to become unshared.
- Returns:
- a byte array containing the message's contents
-
getContentType
java.lang.String getContentType()
Get the message's Content-Type header. Equivalent to: getHeader("Content-Type")- Returns:
- the Content-Type header's value, or null if not present
-
getContentLength
int getContentLength()
Get the message's Content-Length. This is not necessarily the same as the Content-Length header, as the message may omit a Content-Length header and instead been terminated by client EOF.- Returns:
- the number of bytes in this message's content
-
getClientAddress
java.net.InetAddress getClientAddress()
Returns the address of the HTTP client (for incoming requests).- Returns:
- the address of the HTTP client.
-
getClientCertificates
java.security.cert.Certificate[] getClientCertificates()
Returns the certificates sent by the HTTP client (for incoming HTTPS requests that used client certificate authentication).- Returns:
- the certificates sent by the HTTP client.
-
getLocalAddress
java.net.InetAddress getLocalAddress()
Return the local address of the HTTP server that the client is connected to (for incoming requests).- Returns:
- the local address of the HTTP server that the client is connected to.
-
getTrail
com.opencloud.rhino.facilities.sas.Trail getTrail()
-
-