|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.Context
public class Context
Object, which is responsible for holding context during I/O event processing.
| Constructor Summary | |
|---|---|
Context()
|
|
Context(ObjectPool parentPool)
|
|
| Method Summary | |
|---|---|
AttributeHolder |
getAttributes()
Get attributes ( AttributeHolder), associated with the processing
Context. |
Connection |
getConnection()
Get the processing Connection. |
IOEvent |
getIoEvent()
Get the processing IOEvent. |
PostProcessor |
getPostProcessor()
Get the PostProcessor, which will be called after
Processor will finish its execution to finish IOEvent processing. |
Processor |
getProcessor()
Get the Processor, which is responsible to process
the IOEvent. |
ProcessorRunnable |
getProcessorRunnable()
Get the ProcessorRunnable task instance. |
protected AttributeHolder |
initializeAttributeHolder()
|
AttributeHolder |
obtainAttributes()
Get attributes ( AttributeHolder), associated with the processing
Context. |
void |
offerToPool()
Return this Context to the ObjectPool it was
taken from. |
void |
prepare()
If implementation uses ObjectPool to store and reuse
Context instances - this method will be called before
Context will be polled from pool. |
void |
release()
If implementation uses ObjectPool to store and reuse
Context instances - this method will be called before
Context will be offered to pool. |
protected void |
setAttributes(AttributeHolder attributes)
|
void |
setConnection(Connection connection)
Set the processing Connection. |
void |
setIoEvent(IOEvent ioEvent)
Set the processing IOEvent. |
void |
setPostProcessor(PostProcessor ioEventPostProcessor)
Set the PostProcessor, which will be called after
Processor will finish its execution to finish IOEvent processing. |
void |
setProcessor(Processor processor)
Set the Processor, which is responsible to process
the IOEvent. |
void |
setProcessorRunnable(ProcessorRunnable processorRunnable)
Set the ProcessorRunnable task instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Context()
public Context(ObjectPool parentPool)
| Method Detail |
|---|
public IOEvent getIoEvent()
IOEvent.
IOEvent.public void setIoEvent(IOEvent ioEvent)
IOEvent.
ioEvent - the processing IOEvent.public Connection getConnection()
Connection.
Connection.public void setConnection(Connection connection)
Connection.
connection - the processing Connection.public ProcessorRunnable getProcessorRunnable()
ProcessorRunnable task instance.
ProcessorRunnable task instance.public void setProcessorRunnable(ProcessorRunnable processorRunnable)
ProcessorRunnable task instance.
processorRunnable - the ProcessorRunnable task instance.public Processor getProcessor()
Processor, which is responsible to process
the IOEvent.
Processor, which is responsible to process
the IOEvent.public void setProcessor(Processor processor)
Processor, which is responsible to process
the IOEvent.
processor - the Processor, which is responsible to process
the IOEvent.public PostProcessor getPostProcessor()
PostProcessor, which will be called after
Processor will finish its execution to finish IOEvent processing.
PostProcessor, which will be called after
Processor will finish its execution to finish IOEvent processing.public void setPostProcessor(PostProcessor ioEventPostProcessor)
PostProcessor, which will be called after
Processor will finish its execution to finish IOEvent processing.
ioEventPostProcessor - the PostProcessor, which will be
called after Processor will finish its execution to
finish IOEvent processing.public AttributeHolder getAttributes()
AttributeHolder), associated with the processing
Context. AttributeHolder is cleared after each I/O event
processing.
Method may return null, if there were no attributes added before.
AttributeHolder), associated with the processing
Context.public AttributeHolder obtainAttributes()
AttributeHolder), associated with the processing
Context. AttributeHolder is cleared after each I/O event
processing.
Method will always returns non-null AttributeHolder.
AttributeHolder), associated with the processing
Context.protected AttributeHolder initializeAttributeHolder()
protected void setAttributes(AttributeHolder attributes)
public void prepare()
ObjectPool to store and reuse
Context instances - this method will be called before
Context will be polled from pool.
prepare in interface PoolableObjectpublic void release()
ObjectPool to store and reuse
Context instances - this method will be called before
Context will be offered to pool.
release in interface PoolableObjectpublic void offerToPool()
Context to the ObjectPool it was
taken from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||