|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.filter.ReadFilter
com.sun.grizzly.filter.ParserProtocolFilter
public abstract class ParserProtocolFilter
Simple ProtocolFilter implementation which read the available bytes and delegate the decision of reading more bytes or not to a ProtocolParser. The ProtocolParser will decide if more bytes are required before continuing the invokation of the ProtocolChain.
| Field Summary | |
|---|---|
protected boolean |
isSkipRead
Should ParserProtocolFilter read the data from channel |
| Fields inherited from class com.sun.grizzly.filter.ReadFilter |
|---|
continousExecution, readAttempts, UDP_SOCKETADDRESS |
| Fields inherited from interface com.sun.grizzly.ProtocolFilter |
|---|
SUCCESSFUL_READ |
| Constructor Summary | |
|---|---|
ParserProtocolFilter()
|
|
| Method Summary | |
|---|---|
boolean |
execute(Context ctx)
Read available bytes and delegate the processing of them to the next ProtocolFilter in the ProtocolChain. |
protected boolean |
invokeProtocolParser(Context ctx,
ProtocolParser parser)
Invoke the ProtocolParser. |
protected boolean |
isSkipRead()
Method returns true, if this Filter perform channel read operation on execute, or false - Filter assumes the data was read by previous Filters in a chain. |
abstract ProtocolParser |
newProtocolParser()
Return a new or cached ProtocolParser instance. |
boolean |
postExecute(Context context)
If no bytes were available, close the connection by cancelling the SelectionKey. |
protected void |
setSkipRead(boolean isSkipRead)
Method set if this Filter should perform channel read operation on execute, or should assumes the data was read by previous Filters in a chain. |
void |
setSSLConfig(SSLConfig sslConfig)
Configures this Filter to be used with SSL. |
| Methods inherited from class com.sun.grizzly.filter.ReadFilter |
|---|
execute, getReadAttempts, isContinuousExecution, log, setContinuousExecution, setReadAttempts |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isSkipRead
| Constructor Detail |
|---|
public ParserProtocolFilter()
| Method Detail |
|---|
public void setSSLConfig(SSLConfig sslConfig)
SSLReadFilter
sslConfig - Configuration of SSL Settings
public boolean execute(Context ctx)
throws IOException
execute in interface ProtocolFilterexecute in class ReadFilterctx - Context
IOException
protected boolean invokeProtocolParser(Context ctx,
ProtocolParser parser)
ProtocolParser. If more bytes are required,
register the SelectionKey back to its associated
SelectorHandler
ctx - the Context object.
public boolean postExecute(Context context)
throws IOException
ReadFilter
postExecute in interface ProtocolFilterpostExecute in class ReadFiltercontext - Context
IOExceptionpublic abstract ProtocolParser newProtocolParser()
protected boolean isSkipRead()
protected void setSkipRead(boolean isSkipRead)
isSkipRead - If isSkipRead is true, this Filter will perform
channel read operation on execute. If false - Filter assumes the data
was read by previous Filters in a chain.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||