com.liferay.portal.resiliency.spi.agent
Class HttpClientSPIAgent
java.lang.Object
com.liferay.portal.resiliency.spi.agent.HttpClientSPIAgent
- All Implemented Interfaces:
- SPIAgent
public class HttpClientSPIAgent
- extends Object
- implements SPIAgent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAPPING_PATTERN
protected static final String MAPPING_PATTERN
- See Also:
- Constant Field Values
SPI_AGENT_CONTEXT_PATH
protected static final String SPI_AGENT_CONTEXT_PATH
- See Also:
- Constant Field Values
httpServletRequestContent
protected final byte[] httpServletRequestContent
registrationReference
protected final RegistrationReference registrationReference
socketAddress
protected final SocketAddress socketAddress
socketBlockingQueue
protected final BlockingQueue<Socket> socketBlockingQueue
HttpClientSPIAgent
public HttpClientSPIAgent(SPIConfiguration spiConfiguration,
RegistrationReference registrationReference)
throws UnknownHostException
- Throws:
UnknownHostException
destroy
public void destroy()
- Specified by:
destroy
in interface SPIAgent
init
public void init(SPI spi)
throws PortalResiliencyException
- Specified by:
init
in interface SPIAgent
- Throws:
PortalResiliencyException
prepareRequest
public javax.servlet.http.HttpServletRequest prepareRequest(javax.servlet.http.HttpServletRequest request)
throws IOException
- Specified by:
prepareRequest
in interface SPIAgent
- Throws:
IOException
prepareResponse
public javax.servlet.http.HttpServletResponse prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Specified by:
prepareResponse
in interface SPIAgent
service
public void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws PortalResiliencyException
- Specified by:
service
in interface SPIAgent
- Throws:
PortalResiliencyException
transferResponse
public void transferResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception exception)
throws IOException
- Specified by:
transferResponse
in interface SPIAgent
- Throws:
IOException
borrowSocket
protected Socket borrowSocket()
throws IOException
- Throws:
IOException
consumeHttpResponseHead
protected boolean consumeHttpResponseHead(DataInput dataInput)
throws IOException
- Throws:
IOException
returnSocket
protected void returnSocket(Socket socket,
boolean forceCloseSocket)