public class ObjectPool extends Object
| Constructor and Description |
|---|
ObjectPool(Map args)
Constructs an instance of the object pool, including handlers, requests
and responses
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
WinstoneRequest |
getRequestFromPool()
An attempt at pooling request objects for reuse.
|
WinstoneResponse |
getResponseFromPool()
An attempt at pooling request objects for reuse.
|
void |
handleRequest(Socket socket,
Listener listener)
Once the socket request comes in, this method is called.
|
void |
releaseRequestToPool(WinstoneRequest req) |
void |
releaseResponseToPool(WinstoneResponse rsp) |
public ObjectPool(Map args) throws IOException
IOExceptionpublic void destroy()
public void handleRequest(Socket socket, Listener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic WinstoneRequest getRequestFromPool() throws IOException
IOExceptionpublic void releaseRequestToPool(WinstoneRequest req)
public WinstoneResponse getResponseFromPool()
public void releaseResponseToPool(WinstoneResponse rsp)
Copyright © 2014. All rights reserved.