public abstract class DefaultExchange<T> extends Object implements ProtocolContext<T>, org.rapidoid.buffer.BufProvider, org.rapidoid.util.Resetable, org.rapidoid.util.Constants
| Modifier and Type | Field and Description |
|---|---|
protected Channel |
conn |
protected long |
requestId |
protected AtomicLong |
totalWritten |
| Constructor and Description |
|---|
DefaultExchange() |
| Modifier and Type | Method and Description |
|---|---|
String |
address() |
T |
async() |
protected org.rapidoid.data.BinaryMultiData |
binaryMultiData(org.rapidoid.data.KeyValueRanges ranges) |
org.rapidoid.buffer.Buf |
buffer() |
T |
close() |
T |
closeIf(boolean condition) |
long |
connId() |
protected org.rapidoid.data.Data |
data(org.rapidoid.data.Range range) |
protected org.rapidoid.data.Data |
decodedData(org.rapidoid.data.Range range) |
T |
done() |
InetSocketAddress |
getAddress() |
long |
getTotalWritten() |
RapidoidHelper |
helper() |
org.rapidoid.buffer.Buf |
input() |
boolean |
isAsync() |
protected T |
me() |
protected org.rapidoid.data.MultiData |
multiData(org.rapidoid.data.KeyValueRanges ranges) |
org.rapidoid.buffer.Buf |
output() |
String |
readln() |
String |
readN(int count) |
long |
requestId() |
void |
reset() |
void |
setConnection(Channel conn) |
T |
write(byte[] bytes) |
T |
write(byte[] bytes,
int offset,
int length) |
T |
write(ByteBuffer buf) |
T |
write(File file) |
T |
write(String s) |
T |
writeJSON(Object value) |
T |
writeln(String s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisClosed, isClosing, isInitial, log, send, state, waitUntilClosingprotected Channel conn
protected AtomicLong totalWritten
protected long requestId
public void reset()
reset in interface org.rapidoid.util.Resetablepublic void setConnection(Channel conn)
public String address()
address in interface ProtocolContext<T>public T write(String s)
write in interface ProtocolContext<T>public T writeln(String s)
writeln in interface ProtocolContext<T>public T write(byte[] bytes)
write in interface ProtocolContext<T>public T write(byte[] bytes, int offset, int length)
write in interface ProtocolContext<T>public T write(ByteBuffer buf)
write in interface ProtocolContext<T>public T write(File file)
write in interface ProtocolContext<T>public T writeJSON(Object value)
writeJSON in interface ProtocolContext<T>public T close()
close in interface ProtocolContext<T>public T closeIf(boolean condition)
closeIf in interface ProtocolContext<T>public org.rapidoid.buffer.Buf input()
input in interface ProtocolContext<T>public org.rapidoid.buffer.Buf output()
output in interface ProtocolContext<T>public String readln()
readln in interface ProtocolContext<T>public String readN(int count)
readN in interface ProtocolContext<T>public InetSocketAddress getAddress()
getAddress in interface ProtocolContext<T>public RapidoidHelper helper()
helper in interface ProtocolContext<T>public long connId()
connId in interface ProtocolContext<T>protected org.rapidoid.data.Data data(org.rapidoid.data.Range range)
protected org.rapidoid.data.Data decodedData(org.rapidoid.data.Range range)
protected org.rapidoid.data.MultiData multiData(org.rapidoid.data.KeyValueRanges ranges)
protected org.rapidoid.data.BinaryMultiData binaryMultiData(org.rapidoid.data.KeyValueRanges ranges)
public org.rapidoid.buffer.Buf buffer()
buffer in interface org.rapidoid.buffer.BufProviderpublic long getTotalWritten()
public T async()
async in interface ProtocolContext<T>public boolean isAsync()
isAsync in interface ProtocolContext<T>public T done()
done in interface ProtocolContext<T>protected T me()
public long requestId()
requestId in interface ProtocolContext<T>Copyright © 2014–2015 Nikolche Mihajlovski and contributors. All rights reserved.