Package io.netty.handler.codec
Class ProtocolDetectionResult<T>
java.lang.Object
io.netty.handler.codec.ProtocolDetectionResult<T>
- Type Parameters:
T
- the type of the protocol
Result of detecting a protocol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ProtocolDetectionResult
private static final ProtocolDetectionResult
private final T
private final ProtocolDetectionState
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ProtocolDetectionResult
(ProtocolDetectionState state, T result) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ProtocolDetectionResult
<T> detected
(T protocol) Returns aProtocolDetectionResult
which holds the detected protocol.static <T> ProtocolDetectionResult
<T> invalid()
Returns aProtocolDetectionResult
that signals the data was invalid for the protocol.static <T> ProtocolDetectionResult
<T> Returns aProtocolDetectionResult
that signals that more data is needed to detect the protocol.state()
Return theProtocolDetectionState
.
-
Field Details
-
NEEDS_MORE_DATA
-
INVALID
-
state
-
result
-
-
Constructor Details
-
ProtocolDetectionResult
-
-
Method Details
-
needsMoreData
Returns aProtocolDetectionResult
that signals that more data is needed to detect the protocol. -
invalid
Returns aProtocolDetectionResult
that signals the data was invalid for the protocol. -
detected
Returns aProtocolDetectionResult
which holds the detected protocol. -
state
Return theProtocolDetectionState
. If the state isProtocolDetectionState.DETECTED
you can retrieve the protocol viadetectedProtocol()
. -
detectedProtocol
-