|
||||||||||
| 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.
| Field Summary | |
|---|---|
protected IOEvent |
ioEvent
Processing IOEvent |
protected boolean |
isManualIOEventControl
|
protected IOEventProcessingHandler |
processingHandler
IOEventProcessingHandler is called to notify about IOEvent processing life-cycle events like suspend, resume, complete. |
protected boolean |
wasSuspended
true if this IOEvent processing was suspended during its processing, or false otherwise. |
| Constructor Summary | |
|---|---|
Context()
|
|
| Method Summary | |
|---|---|
static Context |
create(Connection connection)
|
static Context |
create(Connection connection,
Processor processor,
IOEvent ioEvent,
IOEventProcessingHandler processingHandler)
|
AttributeHolder |
getAttributes()
Get attributes ( AttributeHolder), associated with the processing
Context. |
Connection |
getConnection()
Get the processing Connection. |
IOEvent |
getIoEvent()
Get the processing IOEvent. |
IOEventProcessingHandler |
getProcessingHandler()
|
Processor |
getProcessor()
Get the Processor, which is responsible to process
the IOEvent. |
boolean |
isManualIOEventControl()
|
void |
recycle()
Recycle this Context |
void |
reset()
If implementation uses ObjectPool
to store and reuse Context instances - this method will be
called before Context will be offered to pool. |
void |
resume()
Notify Context its processing will be resumed in the current thread. |
void |
setConnection(Connection connection)
Set the processing Connection. |
void |
setIoEvent(IOEvent ioEvent)
Set the processing IOEvent. |
void |
setManualIOEventControl()
Switches processing to the manual IOEvent control. |
void |
setProcessingHandler(IOEventProcessingHandler processingHandler)
|
void |
setProcessor(Processor processor)
Set the Processor, which is responsible to process
the IOEvent. |
void |
suspend()
Notify Context its processing will be suspended in the current thread. |
boolean |
wasSuspended()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IOEvent ioEvent
protected IOEventProcessingHandler processingHandler
protected boolean wasSuspended
protected boolean isManualIOEventControl
| Constructor Detail |
|---|
public Context()
| Method Detail |
|---|
public static Context create(Connection connection)
public static Context create(Connection connection,
Processor processor,
IOEvent ioEvent,
IOEventProcessingHandler processingHandler)
public void suspend()
public void resume()
public boolean wasSuspended()
public void setManualIOEventControl()
Connection.enableIOEvent(org.glassfish.grizzly.IOEvent) or
Connection.disableIOEvent(org.glassfish.grizzly.IOEvent) might be
explicitly called.
public boolean isManualIOEventControl()
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 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 IOEventProcessingHandler getProcessingHandler()
public void setProcessingHandler(IOEventProcessingHandler processingHandler)
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.
getAttributes in interface AttributeStorageAttributeHolder), associated with the processing
Context.public void reset()
ObjectPool
to store and reuse Context instances - this method will be
called before Context will be offered to pool.
public void recycle()
Context
recycle in interface Cacheable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||