public class EngineResult extends Object implements IEngineResult
IEngineResult
interface.Constructor and Description |
---|
EngineResult(Status status,
HandshakeStatus handshakeStatus,
int bytesConsumed,
int bytesProduced)
Initializes a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
bytesConsumed()
Returns the number of bytes consumed from the input buffer.
|
int |
bytesProduced()
Returns the number of bytes written to the output buffer.
|
HandshakeStatus |
getHandshakeStatus()
Gets the current handshake status produced by the
IEngine call. |
Status |
getStatus()
Gets the overall result of the
IEngine calls. |
public EngineResult(Status status, HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
status
- the return value of the operationhandshakeStatus
- the current handshaking statusbytesConsumed
- the number of bytes consumed from the input bufferbytesProduced
- the number of bytes placed into the output bufferIllegalArgumentException
- if the status
or handshakeStatus
arguments are null, or if bytesConsumed
or bytesProduced
is
negative.public final int bytesConsumed()
IEngineResult
bytesConsumed
in interface IEngineResult
public final int bytesProduced()
IEngineResult
bytesProduced
in interface IEngineResult
public final Status getStatus()
IEngineResult
IEngine
calls.getStatus
in interface IEngineResult
public final HandshakeStatus getHandshakeStatus()
IEngineResult
IEngine
call.
It should match the value returned by the
IEngine.getHandshakeStatus()
method. The only exception to this
rule is when the call has just finished the ongoing handshake. In such
situation this method should return the HandshakeStatus.FINISHED
status which is forbidden for the IEngine.getHandshakeStatus()
method.getHandshakeStatus
in interface IEngineResult
Copyright © 2017–2021 SNF4J.ORG. All rights reserved.