Class ServletCall
- java.lang.Object
-
- org.restlet.engine.adapter.Call
-
- org.restlet.engine.adapter.ServerCall
-
- org.forgerock.openam.rest.jakarta.servlet.internal.ServletCall
-
public class ServletCall extends org.restlet.engine.adapter.ServerCallCall that is used by the Servlet HTTP server connector.- Author:
- Jerome Louvel
-
-
Constructor Summary
Constructors Constructor Description ServletCall(String serverAddress, int serverPort, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Constructor.ServletCall(org.restlet.Server server, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()Not supported.voidflushBuffers()List<Certificate>getCertificates()StringgetCipherSuite()StringgetClientAddress()intgetClientPort()StringgetHostDomain()Returns the server domain name.StringgetMethod()Returns the request method.org.restlet.data.ProtocolgetProtocol()Returns the server protocol.jakarta.servlet.http.HttpServletRequestgetRequest()Returns the HTTP Servlet request.InputStreamgetRequestEntityStream(long size)org.restlet.util.Series<org.restlet.data.Header>getRequestHeaders()Returns the list of request headers.InputStreamgetRequestHeadStream()StringgetRequestUri()Returns the full request URI.jakarta.servlet.http.HttpServletResponsegetResponse()Returns the HTTP Servlet response.OutputStreamgetResponseEntityStream()Returns the response stream if it exists, null otherwise.StringgetServerAddress()Returns the response address.
Corresponds to the IP address of the responding server.intgetServerPort()Returns the server port.IntegergetSslKeySize()StringgetSslSessionId()PrincipalgetUserPrincipal()StringgetVersion()booleanisConfidential()Indicates if the request was made using a confidential mean.voidsendResponse(org.restlet.Response response)Sends the response back to the client.-
Methods inherited from class org.restlet.engine.adapter.ServerCall
complete, getContentLength, getHostPort, getRequestEntity, getSslSessionIdBytes, isClientKeepAlive, isServerKeepAlive, readRequestHead, shouldResponseBeChunked, writeResponseBody, writeResponseHead, writeResponseHead
-
Methods inherited from class org.restlet.engine.adapter.Call
getLogger, getReasonPhrase, getRepresentation, getRepresentation, getResponseHeaders, getStatusCode, isBroken, isConnectionBroken, isKeepAlive, isRequestChunked, isResponseChunked, setClientAddress, setClientPort, setConfidential, setHostDomain, setHostPort, setMethod, setProtocol, setReasonPhrase, setRequestUri, setServerAddress, setServerPort, setStatusCode, setUserPrincipal, setVersion
-
-
-
-
Constructor Detail
-
ServletCall
public ServletCall(org.restlet.Server server, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Constructor.- Parameters:
server- The parent server.request- The HTTP Servlet request to wrap.response- The HTTP Servlet response to wrap.
-
ServletCall
public ServletCall(String serverAddress, int serverPort, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
Constructor.- Parameters:
serverAddress- The server IP address.serverPort- The server port.request- The Servlet requestresponse- The Servlet response.
-
-
Method Detail
-
abort
public boolean abort()
Not supported. Always returns false.- Specified by:
abortin classorg.restlet.engine.adapter.ServerCall
-
flushBuffers
public void flushBuffers() throws IOException- Overrides:
flushBuffersin classorg.restlet.engine.adapter.ServerCall- Throws:
IOException
-
getCertificates
public List<Certificate> getCertificates()
- Overrides:
getCertificatesin classorg.restlet.engine.adapter.ServerCall
-
getCipherSuite
public String getCipherSuite()
- Overrides:
getCipherSuitein classorg.restlet.engine.adapter.ServerCall
-
getClientAddress
public String getClientAddress()
- Overrides:
getClientAddressin classorg.restlet.engine.adapter.Call
-
getClientPort
public int getClientPort()
- Overrides:
getClientPortin classorg.restlet.engine.adapter.Call
-
getHostDomain
public String getHostDomain()
Returns the server domain name.- Overrides:
getHostDomainin classorg.restlet.engine.adapter.ServerCall- Returns:
- The server domain name.
-
getMethod
public String getMethod()
Returns the request method.- Overrides:
getMethodin classorg.restlet.engine.adapter.Call- Returns:
- The request method.
-
getProtocol
public org.restlet.data.Protocol getProtocol()
Returns the server protocol.- Overrides:
getProtocolin classorg.restlet.engine.adapter.Call- Returns:
- The server protocol.
-
getRequest
public jakarta.servlet.http.HttpServletRequest getRequest()
Returns the HTTP Servlet request.- Returns:
- The HTTP Servlet request.
-
getRequestEntityStream
public InputStream getRequestEntityStream(long size)
- Specified by:
getRequestEntityStreamin classorg.restlet.engine.adapter.ServerCall
-
getRequestHeaders
public org.restlet.util.Series<org.restlet.data.Header> getRequestHeaders()
Returns the list of request headers.- Overrides:
getRequestHeadersin classorg.restlet.engine.adapter.Call- Returns:
- The list of request headers.
-
getRequestHeadStream
public InputStream getRequestHeadStream()
- Specified by:
getRequestHeadStreamin classorg.restlet.engine.adapter.ServerCall
-
getRequestUri
public String getRequestUri()
Returns the full request URI.- Overrides:
getRequestUriin classorg.restlet.engine.adapter.Call- Returns:
- The full request URI.
-
getResponse
public jakarta.servlet.http.HttpServletResponse getResponse()
Returns the HTTP Servlet response.- Returns:
- The HTTP Servlet response.
-
getResponseEntityStream
public OutputStream getResponseEntityStream()
Returns the response stream if it exists, null otherwise.- Specified by:
getResponseEntityStreamin classorg.restlet.engine.adapter.ServerCall- Returns:
- The response stream if it exists, null otherwise.
-
getServerAddress
public String getServerAddress()
Returns the response address.
Corresponds to the IP address of the responding server.- Overrides:
getServerAddressin classorg.restlet.engine.adapter.Call- Returns:
- The response address.
-
getServerPort
public int getServerPort()
Returns the server port.- Overrides:
getServerPortin classorg.restlet.engine.adapter.Call- Returns:
- The server port.
-
getSslKeySize
public Integer getSslKeySize()
- Overrides:
getSslKeySizein classorg.restlet.engine.adapter.ServerCall
-
getSslSessionId
public String getSslSessionId()
- Overrides:
getSslSessionIdin classorg.restlet.engine.adapter.ServerCall
-
getUserPrincipal
public Principal getUserPrincipal()
- Overrides:
getUserPrincipalin classorg.restlet.engine.adapter.Call
-
getVersion
public String getVersion()
- Overrides:
getVersionin classorg.restlet.engine.adapter.Call
-
isConfidential
public boolean isConfidential()
Indicates if the request was made using a confidential mean.- Overrides:
isConfidentialin classorg.restlet.engine.adapter.Call- Returns:
- True if the request was made using a confidential mean.
-
sendResponse
public void sendResponse(org.restlet.Response response) throws IOExceptionSends the response back to the client. Commits the status, headers and optional entity and send them on the network.- Overrides:
sendResponsein classorg.restlet.engine.adapter.ServerCall- Parameters:
response- The high-level response.- Throws:
IOException
-
-