- java.lang.Object
-
- io.netty5.handler.codec.ProtocolDetectionResult<T>
-
- Type Parameters:
T
- the type of the protocol
public final class ProtocolDetectionResult<T> extends Object
Result of detecting a protocol.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ProtocolDetectionResult<T>
detected(T protocol)
Returns aProtocolDetectionResult
which holds the detected protocol.T
detectedProtocol()
static <T> ProtocolDetectionResult<T>
invalid()
Returns aProtocolDetectionResult
that signals the data was invalid for the protocol.static <T> ProtocolDetectionResult<T>
needsMoreData()
Returns aProtocolDetectionResult
that signals that more data is needed to detect the protocol.ProtocolDetectionState
state()
Return theProtocolDetectionState
.
-
-
-
Method Detail
-
needsMoreData
public static <T> ProtocolDetectionResult<T> needsMoreData()
Returns aProtocolDetectionResult
that signals that more data is needed to detect the protocol.
-
invalid
public static <T> ProtocolDetectionResult<T> invalid()
Returns aProtocolDetectionResult
that signals the data was invalid for the protocol.
-
detected
public static <T> ProtocolDetectionResult<T> detected(T protocol)
Returns aProtocolDetectionResult
which holds the detected protocol.
-
state
public ProtocolDetectionState state()
Return theProtocolDetectionState
. If the state isProtocolDetectionState.DETECTED
you can retrieve the protocol viadetectedProtocol()
.
-
detectedProtocol
public T detectedProtocol()
-
-