public abstract class AbstractHTTPConnection extends Object implements HTTPConnection
| 限定符和类型 | 字段和说明 |
|---|---|
protected Object |
attachment |
protected Action1<HTTPConnection> |
closedListener |
protected Action2<HTTPConnection,Throwable> |
exceptionListener |
protected HttpVersion |
httpVersion |
protected SecureSession |
secureSession |
protected Session |
tcpSession |
| 构造器和说明 |
|---|
AbstractHTTPConnection(SecureSession secureSession,
Session tcpSession,
HttpVersion httpVersion) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
HTTPConnection |
close(Action1<HTTPConnection> closedListener) |
HTTPConnection |
exception(Action2<HTTPConnection,Throwable> exceptionListener) |
Object |
getAttachment() |
long |
getCloseTime() |
long |
getDuration() |
HttpVersion |
getHttpVersion() |
long |
getIdleTimeout() |
long |
getLastActiveTime() |
long |
getLastReadTime() |
long |
getLastWrittenTime() |
InetSocketAddress |
getLocalAddress() |
long |
getOpenTime() |
long |
getReadBytes() |
InetSocketAddress |
getRemoteAddress() |
int |
getSessionId() |
long |
getWrittenBytes() |
boolean |
isEncrypted() |
boolean |
isOpen() |
void |
setAttachment(Object attachment) |
void |
writeEncryptMessage(Object message) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnectionTypeprotected final SecureSession secureSession
protected final Session tcpSession
protected final HttpVersion httpVersion
protected volatile Object attachment
protected Action1<HTTPConnection> closedListener
protected Action2<HTTPConnection,Throwable> exceptionListener
public AbstractHTTPConnection(SecureSession secureSession, Session tcpSession, HttpVersion httpVersion)
public Object getAttachment()
getAttachment 在接口中 Connectionpublic void setAttachment(Object attachment)
setAttachment 在接口中 Connectionpublic HttpVersion getHttpVersion()
getHttpVersion 在接口中 HTTPConnectionpublic boolean isOpen()
isOpen 在接口中 Connectionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void writeEncryptMessage(Object message) throws IOException
IOExceptionpublic boolean isEncrypted()
isEncrypted 在接口中 HTTPConnectionpublic int getSessionId()
getSessionId 在接口中 Connectionpublic long getOpenTime()
getOpenTime 在接口中 Connectionpublic long getCloseTime()
getCloseTime 在接口中 Connectionpublic long getDuration()
getDuration 在接口中 Connectionpublic long getLastReadTime()
getLastReadTime 在接口中 Connectionpublic long getLastWrittenTime()
getLastWrittenTime 在接口中 Connectionpublic long getLastActiveTime()
getLastActiveTime 在接口中 Connectionpublic long getReadBytes()
getReadBytes 在接口中 Connectionpublic long getWrittenBytes()
getWrittenBytes 在接口中 Connectionpublic long getIdleTimeout()
getIdleTimeout 在接口中 Connectionpublic InetSocketAddress getLocalAddress()
getLocalAddress 在接口中 Connectionpublic InetSocketAddress getRemoteAddress()
getRemoteAddress 在接口中 Connectionpublic HTTPConnection close(Action1<HTTPConnection> closedListener)
close 在接口中 HTTPConnectionpublic HTTPConnection exception(Action2<HTTPConnection,Throwable> exceptionListener)
exception 在接口中 HTTPConnectionCopyright © 2017. All rights reserved.