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()
void
clearEvent
(int op) void
close()
void
close
(org.apache.hc.core5.io.CloseMode closeMode) void
enqueue
(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority) private static String
formatOps
(int ops) int
org.apache.hc.core5.reactor.IOEventHandler
getId()
long
long
long
getLock()
org.apache.hc.core5.util.Timeout
org.apache.hc.core5.reactor.IOSession.Status
boolean
boolean
isOpen()
private void
logData
(ByteBuffer data, String prefix) org.apache.hc.core5.reactor.Command
poll()
int
read
(ByteBuffer dst) void
setEvent
(int op) void
setEventMask
(int ops) void
setSocketTimeout
(org.apache.hc.core5.util.Timeout timeout) toString()
void
void
void
upgrade
(org.apache.hc.core5.reactor.IOEventHandler handler) int
write
(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:
getId
in interfaceorg.apache.hc.core5.util.Identifiable
-
getLock
- Specified by:
getLock
in interfaceorg.apache.hc.core5.reactor.IOSession
-
hasCommands
public boolean hasCommands()- Specified by:
hasCommands
in interfaceorg.apache.hc.core5.reactor.IOSession
-
poll
public org.apache.hc.core5.reactor.Command poll()- Specified by:
poll
in 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:
enqueue
in interfaceorg.apache.hc.core5.reactor.IOSession
-
channel
- Specified by:
channel
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getRemoteAddress
- Specified by:
getRemoteAddress
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getEventMask
public int getEventMask()- Specified by:
getEventMask
in interfaceorg.apache.hc.core5.reactor.IOSession
-
formatOps
-
setEventMask
public void setEventMask(int ops) - Specified by:
setEventMask
in interfaceorg.apache.hc.core5.reactor.IOSession
-
setEvent
public void setEvent(int op) - Specified by:
setEvent
in interfaceorg.apache.hc.core5.reactor.IOSession
-
clearEvent
public void clearEvent(int op) - Specified by:
clearEvent
in 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:
getStatus
in interfaceorg.apache.hc.core5.reactor.IOSession
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode) - Specified by:
close
in interfaceorg.apache.hc.core5.io.ModalCloseable
-
getSocketTimeout
public org.apache.hc.core5.util.Timeout getSocketTimeout()- Specified by:
getSocketTimeout
in interfaceorg.apache.hc.core5.reactor.IOSession
- Specified by:
getSocketTimeout
in interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout) - Specified by:
setSocketTimeout
in interfaceorg.apache.hc.core5.reactor.IOSession
- Specified by:
setSocketTimeout
in interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
getLastReadTime
public long getLastReadTime()- Specified by:
getLastReadTime
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getLastWriteTime
public long getLastWriteTime()- Specified by:
getLastWriteTime
in interfaceorg.apache.hc.core5.reactor.IOSession
-
updateReadTime
public void updateReadTime()- Specified by:
updateReadTime
in interfaceorg.apache.hc.core5.reactor.IOSession
-
updateWriteTime
public void updateWriteTime()- Specified by:
updateWriteTime
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getLastEventTime
public long getLastEventTime()- Specified by:
getLastEventTime
in interfaceorg.apache.hc.core5.reactor.IOSession
-
getHandler
public org.apache.hc.core5.reactor.IOEventHandler getHandler()- Specified by:
getHandler
in interfaceorg.apache.hc.core5.reactor.IOSession
-
upgrade
public void upgrade(org.apache.hc.core5.reactor.IOEventHandler handler) - Specified by:
upgrade
in interfaceorg.apache.hc.core5.reactor.IOSession
-
logData
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
toString
-