org.glassfish.grizzly.nio.tmpselectors
Class TemporarySelectorWriter
java.lang.Object
org.glassfish.grizzly.AbstractWriter<java.net.SocketAddress>
org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorWriter
- All Implemented Interfaces:
- Writer<java.net.SocketAddress>
- Direct Known Subclasses:
- TCPNIOTemporarySelectorWriter, UDPNIOTemporarySelectorWriter
public abstract class TemporarySelectorWriter
- extends AbstractWriter<java.net.SocketAddress>
- Author:
- oleksiys
|
Method Summary |
TemporarySelectorsEnabledTransport |
getTransport()
|
void |
write(Connection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,java.net.SocketAddress>> completionHandler,
PushBackHandler pushBackHandler)
Method writes the WritableMessage to the specific address. |
void |
write(Connection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,java.net.SocketAddress>> completionHandler,
PushBackHandler pushBackHandler,
long timeout,
java.util.concurrent.TimeUnit timeunit)
Method writes the WritableMessage to the specific address. |
protected long |
write0(NIOConnection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,java.net.SocketAddress> currentResult,
long timeout,
java.util.concurrent.TimeUnit timeunit)
Flush the buffer by looping until the Buffer is empty |
protected abstract long |
writeNow0(NIOConnection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,java.net.SocketAddress> currentResult)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transport
protected final TemporarySelectorsEnabledTransport transport
TemporarySelectorWriter
public TemporarySelectorWriter(TemporarySelectorsEnabledTransport transport)
write
public void write(Connection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,java.net.SocketAddress>> completionHandler,
PushBackHandler pushBackHandler)
- Method writes the
WritableMessage to the specific address.
- Parameters:
connection - the Connection to write todstAddress - the destination address the WritableMessage will be
sent tomessage - the WritableMessage, from which the data will be writtencompletionHandler - CompletionHandler,
which will get notified, when write will be completedpushBackHandler - PushBackHandler, which will be notified
if message was accepted by transport write queue or refused
write
public void write(Connection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,java.net.SocketAddress>> completionHandler,
PushBackHandler pushBackHandler,
long timeout,
java.util.concurrent.TimeUnit timeunit)
- Method writes the
WritableMessage to the specific address.
- Parameters:
connection - the Connection to write todstAddress - the destination address the message will be
sent tomessage - the WritableMessage, from which the data will be writtencompletionHandler - CompletionHandler,
which will get notified, when write will be completed
write0
protected long write0(NIOConnection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,java.net.SocketAddress> currentResult,
long timeout,
java.util.concurrent.TimeUnit timeunit)
throws java.io.IOException
- Flush the buffer by looping until the
Buffer is empty
- Parameters:
connection - the Connection.dstAddress - the destination address.message - currentResult - the result of the write operationtimeout - operation timeout value valuetimeunit - the timeout unit
- Returns:
- The number of bytes written.
- Throws:
java.io.IOException
getTransport
public TemporarySelectorsEnabledTransport getTransport()
writeNow0
protected abstract long writeNow0(NIOConnection connection,
java.net.SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,java.net.SocketAddress> currentResult)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.