public class HttpClientSPIAgent
extends Object
implements com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
Modifier and Type | Field and Description |
---|---|
protected byte[] |
httpServletRequestContent |
protected static String |
MAPPING_PATTERN |
protected com.liferay.portal.kernel.nio.intraband.RegistrationReference |
registrationReference |
protected SocketAddress |
socketAddress |
protected BlockingQueue<Socket> |
socketBlockingQueue |
protected static String |
SPI_AGENT_CONTEXT_PATH |
Constructor and Description |
---|
HttpClientSPIAgent(com.liferay.portal.kernel.resiliency.spi.SPIConfiguration spiConfiguration,
com.liferay.portal.kernel.nio.intraband.RegistrationReference registrationReference) |
Modifier and Type | Method and Description |
---|---|
protected Socket |
borrowSocket() |
protected boolean |
consumeHttpResponseHead(DataInput dataInput) |
void |
destroy() |
void |
init(com.liferay.portal.kernel.resiliency.spi.SPI spi) |
javax.servlet.http.HttpServletRequest |
prepareRequest(javax.servlet.http.HttpServletRequest request) |
javax.servlet.http.HttpServletResponse |
prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
returnSocket(Socket socket,
boolean forceCloseSocket) |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
transferResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception exception) |
protected static final String MAPPING_PATTERN
protected static final String SPI_AGENT_CONTEXT_PATH
protected final byte[] httpServletRequestContent
protected final com.liferay.portal.kernel.nio.intraband.RegistrationReference registrationReference
protected final SocketAddress socketAddress
protected final BlockingQueue<Socket> socketBlockingQueue
public HttpClientSPIAgent(com.liferay.portal.kernel.resiliency.spi.SPIConfiguration spiConfiguration, com.liferay.portal.kernel.nio.intraband.RegistrationReference registrationReference) throws UnknownHostException
UnknownHostException
public void destroy()
destroy
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
public void init(com.liferay.portal.kernel.resiliency.spi.SPI spi) throws com.liferay.portal.kernel.resiliency.PortalResiliencyException
init
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
com.liferay.portal.kernel.resiliency.PortalResiliencyException
public javax.servlet.http.HttpServletRequest prepareRequest(javax.servlet.http.HttpServletRequest request) throws IOException
prepareRequest
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
IOException
public javax.servlet.http.HttpServletResponse prepareResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
prepareResponse
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws com.liferay.portal.kernel.resiliency.PortalResiliencyException
service
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
com.liferay.portal.kernel.resiliency.PortalResiliencyException
public void transferResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Exception exception) throws IOException
transferResponse
in interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
IOException
protected Socket borrowSocket() throws IOException
IOException
protected boolean consumeHttpResponseHead(DataInput dataInput) throws IOException
IOException
protected void returnSocket(Socket socket, boolean forceCloseSocket)