|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.util.SelectionKeyAttachment
com.sun.grizzly.util.SelectionKeyActionAttachment
com.sun.grizzly.util.ThreadAttachment
public class ThreadAttachment
This object represent the state of a WorkerThread
. This include
the ByteBuffer binded to the WorkerThread, application data etc.
Nested Class Summary | |
---|---|
static class |
ThreadAttachment.Mode
|
Constructor Summary | |
---|---|
ThreadAttachment()
|
Method Summary | |
---|---|
void |
associate()
Associates ThreadAttachment with the current thread |
void |
deassociate()
Releases ThreadAttachment association with the current thread |
Object |
getAttribute(String key)
Return an object based on a name. |
Map<String,Object> |
getAttributes()
Return a Map of attribute name/value pairs. |
ByteBuffer |
getByteBuffer()
Return the ByteBuffer shared this thread |
ByteBuffer |
getInputBB()
Return the encrypted ByteBuffer used to handle request. |
int |
getMode()
|
ByteBuffer |
getOutputBB()
Return the encrypted ByteBuffer used to handle response. |
SSLEngine |
getSSLEngine()
Set the SSLEngine . |
String |
getThreadId()
Return the name of the Thread on which this instance is binded. |
void |
postProcess(SelectionKey selectionKey)
SelectionKey attachment postProcessing |
void |
process(SelectionKey selectionKey)
SelectionKey attachment processing |
void |
release(SelectionKey selectionKey)
|
Object |
removeAttribute(String key)
Remove a name/value object. |
void |
reset()
|
void |
setAttribute(String key,
Object value)
Set a name/value object. |
void |
setAttributes(Map<String,Object> attributes)
Set a Map of attribute name/value pairs. |
void |
setByteBuffer(ByteBuffer byteBuffer)
Set the ByteBuffer shared this thread |
void |
setInputBB(ByteBuffer inputBB)
Set the encrypted ByteBuffer used to handle request. |
void |
setMode(int mode)
|
void |
setOutputBB(ByteBuffer outputBB)
Set the encrypted ByteBuffer used to handle response. |
void |
setSSLEngine(SSLEngine sslEngine)
Get the SSLEngine . |
void |
setThreadId(String threadId)
Set the Thread's name on which this instance is binded. |
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachment |
---|
getAttachment, getTimeout, setTimeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadAttachment()
Method Detail |
---|
public int getMode()
public void setMode(int mode)
public void setAttribute(String key, Object value)
AttributeHolder
setAttribute
in interface AttributeHolder
key
- - name of an attributevalue
- - value of named attributepublic Object getAttribute(String key)
AttributeHolder
getAttribute
in interface AttributeHolder
key
- - name of an attribute
public Object removeAttribute(String key)
AttributeHolder
removeAttribute
in interface AttributeHolder
key
- - name of an attribute
public void setAttributes(Map<String,Object> attributes)
AttributeHolder
Map
of attribute name/value pairs.
Old AttributeHolder
values will not be available.
Later changes of this Map
will lead to changes to the current
AttributeHolder
.
setAttributes
in interface AttributeHolder
attributes
- - map of name/value pairspublic Map<String,Object> getAttributes()
AttributeHolder
Map
of attribute name/value pairs.
Updates, performed on the returned Map
will be reflected in
this AttributeHolder
getAttributes
in interface AttributeHolder
Map
of attribute name/value pairspublic void setByteBuffer(ByteBuffer byteBuffer)
ByteBuffer
shared this thread
public ByteBuffer getByteBuffer()
ByteBuffer
shared this thread
public ByteBuffer getInputBB()
ByteBuffer
used to handle request.
ByteBuffer
public void setInputBB(ByteBuffer inputBB)
ByteBuffer
used to handle request.
inputBB
- ByteBuffer
public ByteBuffer getOutputBB()
ByteBuffer
used to handle response.
ByteBuffer
public void setOutputBB(ByteBuffer outputBB)
ByteBuffer
used to handle response.
outputBB
- ByteBuffer
public SSLEngine getSSLEngine()
SSLEngine
.
SSLEngine
public void setSSLEngine(SSLEngine sslEngine)
SSLEngine
.
sslEngine
- SSLEngine
public String getThreadId()
public void setThreadId(String threadId)
public void associate()
public void deassociate()
public void process(SelectionKey selectionKey)
process
in class SelectionKeyActionAttachment
selectionKey
- public void postProcess(SelectionKey selectionKey)
postProcess
in class SelectionKeyActionAttachment
selectionKey
- public void reset()
public void release(SelectionKey selectionKey)
release
in class SelectionKeyAttachment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |