Class LoggingIOSession
java.lang.Object
org.apache.hc.client5.http.impl.async.LoggingIOSession
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,WritableByteChannel,org.apache.hc.core5.http.SocketModalCloseable,org.apache.hc.core5.io.ModalCloseable,org.apache.hc.core5.reactor.IOSession,org.apache.hc.core5.util.Identifiable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hc.core5.reactor.IOSession
org.apache.hc.core5.reactor.IOSession.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoggingIOSession(org.apache.hc.core5.reactor.IOSession session, org.slf4j.Logger log, org.slf4j.Logger wireLog) -
Method Summary
Modifier and TypeMethodDescriptionchannel()voidclearEvent(int op) voidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode) voidenqueue(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority) private static StringformatOps(int ops) intorg.apache.hc.core5.reactor.IOEventHandlergetId()longlonglonggetLock()org.apache.hc.core5.util.Timeoutorg.apache.hc.core5.reactor.IOSession.StatusbooleanbooleanisOpen()private voidlogData(ByteBuffer data, String prefix) org.apache.hc.core5.reactor.Commandpoll()intread(ByteBuffer dst) voidsetEvent(int op) voidsetEventMask(int ops) voidsetSocketTimeout(org.apache.hc.core5.util.Timeout timeout) toString()voidvoidvoidupgrade(org.apache.hc.core5.reactor.IOEventHandler handler) intwrite(ByteBuffer src)
-
Field Details
-
log
private final org.slf4j.Logger log -
wireLog
private final org.slf4j.Logger wireLog -
session
private final org.apache.hc.core5.reactor.IOSession session
-
-
Constructor Details
-
LoggingIOSession
public LoggingIOSession(org.apache.hc.core5.reactor.IOSession session, org.slf4j.Logger log, org.slf4j.Logger wireLog)
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.apache.hc.core5.util.Identifiable
-
getLock
- Specified by:
getLockin interfaceorg.apache.hc.core5.reactor.IOSession
-
hasCommands
public boolean hasCommands()- Specified by:
hasCommandsin interfaceorg.apache.hc.core5.reactor.IOSession
-
poll
public org.apache.hc.core5.reactor.Command poll()- Specified by:
pollin interfaceorg.apache.hc.core5.reactor.IOSession
-
enqueue
public void enqueue(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority) - Specified by:
enqueuein interfaceorg.apache.hc.core5.reactor.IOSession
-
channel
- Specified by:
channelin interfaceorg.apache.hc.core5.reactor.IOSession
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceorg.apache.hc.core5.reactor.IOSession
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.hc.core5.reactor.IOSession
-
getEventMask
public int getEventMask()- Specified by:
getEventMaskin interfaceorg.apache.hc.core5.reactor.IOSession
-
formatOps
-
setEventMask
public void setEventMask(int ops) - Specified by:
setEventMaskin interfaceorg.apache.hc.core5.reactor.IOSession
-
setEvent
public void setEvent(int op) - Specified by:
setEventin interfaceorg.apache.hc.core5.reactor.IOSession
-
clearEvent
public void clearEvent(int op) - Specified by:
clearEventin interfaceorg.apache.hc.core5.reactor.IOSession
-
isOpen
public boolean isOpen() -
close
public void close() -
getStatus
public org.apache.hc.core5.reactor.IOSession.Status getStatus()- Specified by:
getStatusin interfaceorg.apache.hc.core5.reactor.IOSession
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode) - Specified by:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-
getSocketTimeout
public org.apache.hc.core5.util.Timeout getSocketTimeout()- Specified by:
getSocketTimeoutin interfaceorg.apache.hc.core5.reactor.IOSession- Specified by:
getSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout) - Specified by:
setSocketTimeoutin interfaceorg.apache.hc.core5.reactor.IOSession- Specified by:
setSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
getLastReadTime
public long getLastReadTime()- Specified by:
getLastReadTimein interfaceorg.apache.hc.core5.reactor.IOSession
-
getLastWriteTime
public long getLastWriteTime()- Specified by:
getLastWriteTimein interfaceorg.apache.hc.core5.reactor.IOSession
-
updateReadTime
public void updateReadTime()- Specified by:
updateReadTimein interfaceorg.apache.hc.core5.reactor.IOSession
-
updateWriteTime
public void updateWriteTime()- Specified by:
updateWriteTimein interfaceorg.apache.hc.core5.reactor.IOSession
-
getLastEventTime
public long getLastEventTime()- Specified by:
getLastEventTimein interfaceorg.apache.hc.core5.reactor.IOSession
-
getHandler
public org.apache.hc.core5.reactor.IOEventHandler getHandler()- Specified by:
getHandlerin interfaceorg.apache.hc.core5.reactor.IOSession
-
upgrade
public void upgrade(org.apache.hc.core5.reactor.IOEventHandler handler) - Specified by:
upgradein interfaceorg.apache.hc.core5.reactor.IOSession
-
logData
- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
toString
-