|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.Context
com.sun.grizzly.filterchain.FilterChainContext
public class FilterChainContext
FilterChain Context implementation.
Context,
FilterChain| Constructor Summary | |
|---|---|
FilterChainContext(ObjectPool parentPool)
|
|
| Method Summary | |
|---|---|
Object |
getAddress()
Get address, associated with the current IOEvent processing. |
Filter |
getCurrentFilter()
Get Filter, which is currently running. |
int |
getCurrentFilterIdx()
Get index of the currently executing Filter in
the filters list. |
List<Filter> |
getExecutedFilters()
Get List of executed Filters. |
FilterChain |
getFilterChain()
Get FilterChain, which runs the Filter. |
List<Filter> |
getFilters()
Get List of Filters. |
NextAction |
getInvokeAction()
Get NextAction implementation, which instructs FilterChain to
process next Filter in chain. |
NextAction |
getInvokeAction(List<Filter> filters)
Get NextAction implementation, which instructs FilterChain to
process next Filter in chain. |
NextAction |
getInvokeAction(List<Filter> filters,
int nextFilterIdx)
Get NextAction implementation, which instructs FilterChain to
process next Filter in chain. |
Object |
getMessage()
Get message object, associated with the current processing. |
NextAction |
getRerunChainAction()
Get NextAction implementation, which is expected only on post processing
phase. |
NextAction |
getStopAction()
Get NextAction implementation, which instructs FilterChain
to stop executing phase and start post executing filters. |
StreamReader |
getStreamReader()
Get the StreamReader, associated with processing. |
StreamWriter |
getStreamWriter()
Get the StreamWriter, associated with processing. |
NextAction |
getSuspendAction()
Get NextAction, which instructs FilterChain to suspend filter
chain execution, both execute and post-execute phases. |
void |
release()
Release the context associated resources. |
void |
setAddress(Object address)
Set address, associated with the current IOEvent processing. |
protected void |
setCurrentFilter(Filter currentFilter)
Set Filter, which is currently running. |
void |
setCurrentFilterIdx(int currentFilterIdx)
Set index of the currently executing Filter in
the filters list. |
protected void |
setExecutedFilters(List<Filter> executedFilters)
Set List of executed Filters. |
void |
setFilters(List<Filter> filters)
Set List of Filters. |
void |
setMessage(Object message)
Set message object, associated with the current processing. |
void |
setStreamReader(StreamReader streamReader)
Set the StreamReader, associated with processing. |
void |
setStreamWriter(StreamWriter streamWriter)
Set the StreamWriter, associated with processing. |
String |
toString()
|
| Methods inherited from class com.sun.grizzly.Context |
|---|
getAttributes, getConnection, getIoEvent, getPostProcessor, getProcessor, getProcessorRunnable, initializeAttributeHolder, obtainAttributes, offerToPool, prepare, setAttributes, setConnection, setIoEvent, setPostProcessor, setProcessor, setProcessorRunnable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilterChainContext(ObjectPool parentPool)
| Method Detail |
|---|
public List<Filter> getExecutedFilters()
List of executed Filters.
List of executed Filters.protected void setExecutedFilters(List<Filter> executedFilters)
List of executed Filters.
executedFilters - List of executed Filters.public List<Filter> getFilters()
List of Filters.
List of Filters.public void setFilters(List<Filter> filters)
List of Filters.
filters - List of Filters.public int getCurrentFilterIdx()
Filter in
the filters list.
Filter in
the filters list.public void setCurrentFilterIdx(int currentFilterIdx)
Filter in
the filters list.
currentFilterIdx - index of the currently executing Filter
in the filters list.public FilterChain getFilterChain()
FilterChain, which runs the Filter.
FilterChain, which runs the Filter.public Filter getCurrentFilter()
Filter, which is currently running.
Filter, which is currently running.protected void setCurrentFilter(Filter currentFilter)
Filter, which is currently running.
currentFilter - Filter, which is currently running.public Object getMessage()
FilterChain represents sequence of parser and process
Filters. Each parser can change the message representation until
it will come to processor Filter.
public void setMessage(Object message)
FilterChain represents sequence of parser and process
Filters. Each parser can change the message representation until
it will come to processor Filter.
message - message object, associated with the current processing.public Object getAddress()
IOEvent processing.
When we process IOEvent#READ event - it represents sender address,
or when process IOEvent#WRITE - address of receiver.
IOEvent processing.public void setAddress(Object address)
IOEvent processing.
When we process IOEvent#READ event - it represents sender address,
or when process IOEvent#WRITE - address of receiver.
address - address, associated with the current IOEvent processing.public StreamReader getStreamReader()
StreamReader, associated with processing.
Filters are allowed to change context associated
StreamReader. For example SSLFilter wraps original
FilterChainContext's StreamReader with
SSLStreamReader and next filter on chain will work with
SSL-enabled StreamReader.
StreamReader, associated with processing.public void setStreamReader(StreamReader streamReader)
StreamReader, associated with processing.
Filters are allowed to change context associated
StreamReader. For example SSLFilter wraps original
FilterChainContext's StreamReader with
SSLStreamReader and next filter on chain will work with
SSL-enabled StreamReader.
streamReader - the StreamReader, associated with processing.public StreamWriter getStreamWriter()
StreamWriter, associated with processing.
Filters are allowed to change context associated
StreamWriter.
StreamWriter, associated with processing.public void setStreamWriter(StreamWriter streamWriter)
StreamWriter, associated with processing.
Filters are allowed to change context associated
StreamWriter.
streamWriter - the StreamWriter, associated with processing.public NextAction getInvokeAction()
NextAction implementation, which instructs FilterChain to
process next Filter in chain.
Normally, after receiving this instruction from Filter,
FilterChain takes Filter with index:
AbstractNextAction.getNextFilterIdx() from AbstractNextAction.getFilters()
chain.
Any Filter implementation is free to change the Filter
execution sequence.
NextAction implementation, which instructs FilterChain to
process next Filter in chain.getInvokeAction(java.util.List),
getInvokeAction(java.util.List, int)public NextAction getInvokeAction(List<Filter> filters)
NextAction implementation, which instructs FilterChain to
process next Filter in chain.
Normally, after receiving this instruction from Filter,
FilterChain takes Filter with index:
AbstractNextAction.getNextFilterIdx() from AbstractNextAction.getFilters()
chain.
Any Filter implementation is free to change the Filter
execution sequence.
filters - new list of the filters to be invoked in the chain processing
NextAction implementation, which instructs FilterChain to
process next Filter in chain.getInvokeAction(),
getInvokeAction(java.util.List, int)
public NextAction getInvokeAction(List<Filter> filters,
int nextFilterIdx)
NextAction implementation, which instructs FilterChain to
process next Filter in chain.
Normally, after receiving this instruction from Filter,
FilterChain takes Filter with index:
AbstractNextAction.getNextFilterIdx() from AbstractNextAction.getFilters()
chain.
Any Filter implementation is free to change the Filter
execution sequence.
filters - new list of the filters to be invoked in the chain processingnextFilterIdx - new index of the Filter in NextAction.getFilters()
list, which should be executed next.
NextAction implementation, which instructs FilterChain to
process next Filter in chain.getInvokeAction(),
getInvokeAction(java.util.List)public NextAction getRerunChainAction()
NextAction implementation, which is expected only on post processing
phase. This implementation instructs FilterChain to re-process the
IOEvent processing again from the beginning.
NextAction implementation, which instructs FilterChain
to re-process the IOEvent processing again from the beginning.public NextAction getStopAction()
NextAction implementation, which instructs FilterChain
to stop executing phase and start post executing filters.
NextAction implementation, which instructs FilterChain
to stop executing phase and start post executing filters.public NextAction getSuspendAction()
NextAction, which instructs FilterChain to suspend filter
chain execution, both execute and post-execute phases.
NextAction, which instructs FilterChain to suspend
filter chain execution, both execute and post-execute phases.public void release()
release in interface PoolableObjectrelease in class Contextpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||