com.sun.grizzly.filter
Class UDPWriteFilter
java.lang.Object
com.sun.grizzly.filter.UDPWriteFilter
- All Implemented Interfaces:
- ProtocolFilter
public class UDPWriteFilter
- extends Object
- implements ProtocolFilter
Simple ProtocolFilter implementation which write the available bytes
and delegate the processing to the next ProtocolFilter in the ProtocolChain.
If no bytes are available for write, no new ProtocolHandler will be a invoked and
the connection (SelectionKey) will be cancelled.
- Author:
- Jeanfrancois Arcand
Method Summary |
boolean |
execute(Context ctx)
Write available bytes and delegate the processing of them to the next
ProtocolFilter in the ProtocolChain. |
protected void |
log(String msg,
Throwable t)
Log a message/exception. |
boolean |
postExecute(Context ctx)
Re-enable the SelectionKey and make sure the ByteBuffer has been cleared. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDP_SOCKETADDRESS
public static final String UDP_SOCKETADDRESS
- See Also:
- Constant Field Values
UDPWriteFilter
public UDPWriteFilter()
execute
public boolean execute(Context ctx)
throws IOException
- Write available bytes and delegate the processing of them to the next
ProtocolFilter in the ProtocolChain.
- Specified by:
execute
in interface ProtocolFilter
- Parameters:
ctx
- Context
- Returns:
- true if the next ProtocolFilter on the ProtocolChain
need to bve invoked.
- Throws:
IOException
postExecute
public boolean postExecute(Context ctx)
throws IOException
- Re-enable the SelectionKey and make sure the ByteBuffer has been cleared.
- Specified by:
postExecute
in interface ProtocolFilter
- Parameters:
ctx
- Context
- Returns:
- true if the previous ProtocolFilter postExecute method
needs to be invoked.
- Throws:
IOException
log
protected void log(String msg,
Throwable t)
- Log a message/exception.
- Parameters:
msg
- String
t
- Throwable
Copyright © 2010 SUN Microsystems. All Rights Reserved.