public class ObjectPool
extends java.lang.Object
| Constructor and Description |
|---|
ObjectPool(java.util.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(java.net.Socket socket,
Listener listener)
Once the socket request comes in, this method is called.
|
void |
releaseRequestToPool(WinstoneRequest req) |
void |
releaseResponseToPool(WinstoneResponse rsp) |
public ObjectPool(java.util.Map args)
throws java.io.IOException
java.io.IOExceptionpublic void destroy()
public void handleRequest(java.net.Socket socket,
Listener listener)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic WinstoneRequest getRequestFromPool() throws java.io.IOException
java.io.IOExceptionpublic void releaseRequestToPool(WinstoneRequest req)
public WinstoneResponse getResponseFromPool()
public void releaseResponseToPool(WinstoneResponse rsp)
Copyright © 2013. All Rights Reserved.