Liferay 6.2-ce-ga5

com.liferay.portal.resiliency.spi.agent
Class HttpClientSPIAgent

java.lang.Object
  extended by com.liferay.portal.resiliency.spi.agent.HttpClientSPIAgent
All Implemented Interfaces:
SPIAgent

public class HttpClientSPIAgent
extends Object
implements SPIAgent


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.liferay.portal.kernel.resiliency.spi.agent.SPIAgent
SPIAgent.Lifecycle
 
Field Summary
protected  byte[] httpServletRequestContent
           
protected static String MAPPING_PATTERN
           
protected  RegistrationReference registrationReference
           
protected  SocketAddress socketAddress
           
protected  BlockingQueue<Socket> socketBlockingQueue
           
protected static String SPI_AGENT_CONTEXT_PATH
           
 
Constructor Summary
HttpClientSPIAgent(SPIConfiguration spiConfiguration, RegistrationReference registrationReference)
           
 
Method Summary
protected  Socket borrowSocket()
           
protected  boolean consumeHttpResponseHead(DataInput dataInput)
           
 void destroy()
           
 void init(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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

HttpClientSPIAgent

public HttpClientSPIAgent(SPIConfiguration spiConfiguration,
                          RegistrationReference registrationReference)
                   throws UnknownHostException
Throws:
UnknownHostException
Method Detail

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)

Liferay 6.2-ce-ga5