public interface NetworkChannel
Modifier and Type | Method and Description |
---|---|
void |
close(Promise<Void> promise)
Close the connection.
|
Object |
getContext()
Retrieves the value set using
setContext(Object) . |
void |
setContext(Object context)
Allows an arbitrary object to be associated with this channel object.
|
void |
write(ByteBuffer buffer,
Promise<Boolean> promise)
Write data to the network connection.
|
void close(Promise<Void> promise)
promise
- a promise which is to be completed when the connection is closed.void write(ByteBuffer buffer, Promise<Boolean> promise)
buffer
- contains the data to write.promise
- a promise which is to be completed when the data is written.void setContext(Object context)
context
- Object getContext()
setContext(Object)
.
Returns null
if no value has yet been set.setContext(Object)
Copyright © 2015 International Business Machines Corporation. All rights reserved.