T
- the type of the protocolpublic final class ProtocolDetectionResult<T>
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static <T> ProtocolDetectionResult<T> |
detected(T protocol)
Returns a
ProtocolDetectionResult which holds the detected protocol. |
T |
detectedProtocol()
|
static <T> ProtocolDetectionResult<T> |
invalid()
Returns a
ProtocolDetectionResult that signals the data was invalid for the protocol. |
static <T> ProtocolDetectionResult<T> |
needsMoreData()
Returns a
ProtocolDetectionResult that signals that more data is needed to detect the protocol. |
ProtocolDetectionState |
state()
Return the
ProtocolDetectionState . |
public static <T> ProtocolDetectionResult<T> needsMoreData()
ProtocolDetectionResult
that signals that more data is needed to detect the protocol.public static <T> ProtocolDetectionResult<T> invalid()
ProtocolDetectionResult
that signals the data was invalid for the protocol.public static <T> ProtocolDetectionResult<T> detected(T protocol)
ProtocolDetectionResult
which holds the detected protocol.public ProtocolDetectionState state()
ProtocolDetectionState
. If the state is ProtocolDetectionState.DETECTED
you
can retrieve the protocol via detectedProtocol()
.public T detectedProtocol()