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
public final class ProtocolDetectionResult<T> extends java.lang.ObjectResult 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 aProtocolDetectionResultwhich holds the detected protocol.TdetectedProtocol()static <T> ProtocolDetectionResult<T>invalid()Returns aProtocolDetectionResultthat signals the data was invalid for the protocol.static <T> ProtocolDetectionResult<T>needsMoreData()Returns aProtocolDetectionResultthat signals that more data is needed to detect the protocol.ProtocolDetectionStatestate()Return theProtocolDetectionState.
-
-
-
Method Detail
-
needsMoreData
public static <T> ProtocolDetectionResult<T> needsMoreData()
Returns aProtocolDetectionResultthat signals that more data is needed to detect the protocol.
-
invalid
public static <T> ProtocolDetectionResult<T> invalid()
Returns aProtocolDetectionResultthat signals the data was invalid for the protocol.
-
detected
public static <T> ProtocolDetectionResult<T> detected(T protocol)
Returns aProtocolDetectionResultwhich holds the detected protocol.
-
state
public ProtocolDetectionState state()
Return theProtocolDetectionState. If the state isProtocolDetectionState.DETECTEDyou can retrieve the protocol viadetectedProtocol().
-
detectedProtocol
public T detectedProtocol()
-
-