@Authors(value="Nikolche Mihajlovski") @Since(value="2.0.0") public class RapidoidConnection extends org.rapidoid.RapidoidThing implements org.rapidoid.util.Resetable, Channel, org.rapidoid.expire.Expiring, org.rapidoid.util.Constants
| Modifier and Type | Field and Description |
|---|---|
org.rapidoid.buffer.Buf |
input |
SelectionKey |
key |
org.rapidoid.buffer.Buf |
outgoing |
org.rapidoid.buffer.Buf |
output |
AMP, ANY, ASTERISK, BYTE_0, COL, CR, CR_, CR_LF, CR_LF_CR_LF, DELETE, EMPTY_ARRAY, EMPTY_STRING_ARRAY, EQ, F, GET, GET_OR_POST, HEAD, HTTP_VERBS, LAST_6, LF, LF_, LF_LF, MALFORMED_CHAR, NOT_FOUND, OPTIONS, PATCH, POST, PUT, SEMI_COL, SEPARATOR_LINE, SPACE, SPACE_, T, TRACE, UTF8_2_BYTES_LEAD, UTF8_3_BYTES_LEAD, UTF8_4_BYTES_LEAD, UTF8_CONTINUATION| Constructor and Description |
|---|
RapidoidConnection(RapidoidWorker worker,
org.rapidoid.buffer.BufGroup bufs) |
| Modifier and Type | Method and Description |
|---|---|
String |
address() |
long |
async() |
Channel |
close() |
void |
close(boolean waitToWrite) |
boolean |
closeAfterWrite() |
Channel |
closeIf(boolean condition) |
long |
connId() |
void |
error() |
void |
expire() |
boolean |
finishedWriting() |
InetSocketAddress |
getAddress() |
long |
getExpiresAt() |
Protocol |
getProtocol() |
long |
handle() |
RapidoidHelper |
helper() |
org.rapidoid.buffer.Buf |
input() |
boolean |
isAsync() |
boolean |
isClient() |
boolean |
isClosed() |
boolean |
isClosing() |
boolean |
isInitial() |
CtxListener |
listener() |
void |
log(String msg) |
boolean |
onSameThread() |
org.rapidoid.buffer.Buf |
output() |
OutputStream |
outputStream() |
String |
readln() |
String |
readN(int count) |
long |
requestId() |
void |
reset() |
void |
resume(long expectedConnId,
long handle,
AsyncLogic asyncLogic) |
Channel |
send() |
void |
setClient(boolean isClient) |
void |
setExpiresAt(long expiresAt) |
void |
setInitial(boolean initial) |
void |
setListener(CtxListener listener) |
void |
setProtocol(Protocol protocol) |
void |
setRequest(IRequest request) |
ConnState |
state() |
String |
toString() |
void |
waitUntilClosing() |
Channel |
write(byte[] bytes) |
Channel |
write(byte[] bytes,
int offset,
int length) |
Channel |
write(ByteBuffer buf) |
Channel |
write(File file) |
Channel |
write(String s) |
Channel |
writeJSON(Object value) |
Channel |
writeln(String s) |
public final org.rapidoid.buffer.Buf input
public final org.rapidoid.buffer.Buf output
public final org.rapidoid.buffer.Buf outgoing
public volatile SelectionKey key
public RapidoidConnection(RapidoidWorker worker, org.rapidoid.buffer.BufGroup bufs)
public void reset()
reset in interface org.rapidoid.util.Resetablepublic void log(String msg)
log in interface ProtocolContext<Channel>public InetSocketAddress getAddress()
getAddress in interface ProtocolContext<Channel>public Channel write(String s)
write in interface ProtocolContext<Channel>public Channel writeln(String s)
writeln in interface ProtocolContext<Channel>public Channel write(byte[] bytes)
write in interface ProtocolContext<Channel>public Channel write(byte[] bytes, int offset, int length)
write in interface ProtocolContext<Channel>public Channel write(ByteBuffer buf)
write in interface ProtocolContext<Channel>public Channel write(File file)
write in interface ProtocolContext<Channel>public Channel writeJSON(Object value)
writeJSON in interface ProtocolContext<Channel>public boolean closeAfterWrite()
public Channel send()
send in interface ProtocolContext<Channel>public void error()
public void close(boolean waitToWrite)
public void resume(long expectedConnId,
long handle,
AsyncLogic asyncLogic)
resume in interface ProtocolContext<Channel>public org.rapidoid.buffer.Buf input()
input in interface ProtocolContext<Channel>public org.rapidoid.buffer.Buf output()
output in interface ProtocolContext<Channel>public OutputStream outputStream()
outputStream in interface ProtocolContext<Channel>public boolean onSameThread()
onSameThread in interface ProtocolContext<Channel>public RapidoidHelper helper()
helper in interface ProtocolContext<Channel>public CtxListener listener()
public void setListener(CtxListener listener)
public String address()
address in interface ProtocolContext<Channel>public Channel close()
close in interface ProtocolContext<Channel>public Channel closeIf(boolean condition)
closeIf in interface ProtocolContext<Channel>public String readln()
readln in interface ProtocolContext<Channel>public String readN(int count)
readN in interface ProtocolContext<Channel>public ConnState state()
state in interface ProtocolContext<Channel>public long handle()
handle in interface ProtocolContext<Channel>public boolean isInitial()
isInitial in interface ProtocolContext<Channel>public void setInitial(boolean initial)
public long async()
async in interface ProtocolContext<Channel>public boolean isAsync()
isAsync in interface ProtocolContext<Channel>public boolean isClient()
public void setClient(boolean isClient)
public void setProtocol(Protocol protocol)
public Protocol getProtocol()
public boolean isClosing()
isClosing in interface ProtocolContext<Channel>public boolean isClosed()
isClosed in interface ProtocolContext<Channel>public void waitUntilClosing()
waitUntilClosing in interface ProtocolContext<Channel>public long connId()
connId in interface ProtocolContext<Channel>public long requestId()
requestId in interface ProtocolContext<Channel>public void setRequest(IRequest request)
setRequest in interface ProtocolContext<Channel>public void setExpiresAt(long expiresAt)
setExpiresAt in interface org.rapidoid.expire.Expiringpublic long getExpiresAt()
getExpiresAt in interface org.rapidoid.expire.Expiringpublic void expire()
expire in interface org.rapidoid.expire.Expiringpublic boolean finishedWriting()
Copyright © 2014–2017 Nikolche Mihajlovski and contributors. All rights reserved.