com.sun.grizzly.nio.transport
Class UDPNIOAsyncQueueWriter

java.lang.Object
  extended by com.sun.grizzly.AbstractWriter<SocketAddress>
      extended by com.sun.grizzly.nio.AbstractNIOAsyncQueueWriter
          extended by com.sun.grizzly.nio.transport.UDPNIOAsyncQueueWriter
All Implemented Interfaces:
AsyncQueueProcessor, AsyncQueueWriter<SocketAddress>, Processor, Writer<SocketAddress>

public class UDPNIOAsyncQueueWriter
extends AbstractNIOAsyncQueueWriter

The UDP transport AsyncQueueWriter implementation, based on the Java NIO

Author:
Alexey Stashok

Field Summary
 
Fields inherited from class com.sun.grizzly.nio.AbstractNIOAsyncQueueWriter
transport
 
Fields inherited from interface com.sun.grizzly.asyncqueue.AsyncQueueProcessor
NOT_REGISTER_KEY
 
Constructor Summary
UDPNIOAsyncQueueWriter(NIOTransport transport)
           
 
Method Summary
 void afterProcess(Context context)
          Method will be called by framework after Processor execution, so it can release associated resources.
 void beforeProcess(Context context)
          Method will be called by framework before executing this Processor.
 Context context()
          Creates Context
protected  void onReadyToWrite(Connection connection)
           
protected  int write0(Connection connection, SocketAddress dstAddress, Buffer buffer, WriteResult<Buffer,SocketAddress> currentResult)
           
 
Methods inherited from class com.sun.grizzly.nio.AbstractNIOAsyncQueueWriter
close, doWrite, failWriteRecord, getContextPool, isInterested, isReady, onClose, onWriteCompleted, onWriteFailure, onWriteIncompleted, process, processAsync, setInterested, write, write
 
Methods inherited from class com.sun.grizzly.AbstractWriter
write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.grizzly.Writer
write, write, write, write, write
 

Constructor Detail

UDPNIOAsyncQueueWriter

public UDPNIOAsyncQueueWriter(NIOTransport transport)
Method Detail

write0

protected int write0(Connection connection,
                     SocketAddress dstAddress,
                     Buffer buffer,
                     WriteResult<Buffer,SocketAddress> currentResult)
              throws IOException
Specified by:
write0 in class AbstractNIOAsyncQueueWriter
Throws:
IOException

onReadyToWrite

protected void onReadyToWrite(Connection connection)
                       throws IOException
Specified by:
onReadyToWrite in class AbstractNIOAsyncQueueWriter
Throws:
IOException

context

public Context context()
Description copied from interface: Processor
Creates Context

Returns:
Context, or null, if default Context could be used.

beforeProcess

public void beforeProcess(Context context)
                   throws IOException
Description copied from interface: Processor
Method will be called by framework before executing this Processor.

Parameters:
context - processing context
Throws:
IOException

afterProcess

public void afterProcess(Context context)
                  throws IOException
Description copied from interface: Processor
Method will be called by framework after Processor execution, so it can release associated resources.

Parameters:
context - processing context
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.