public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<RSocketFrameTypeMessageCondition>
SETUP and METADATA_PUSH, from the handling of
stream requests.| Modifier and Type | Field and Description |
|---|---|
static RSocketFrameTypeMessageCondition |
CONNECT_CONDITION
Condition to match the initial SETUP frame and subsequent metadata pushes.
|
static String |
FRAME_TYPE_HEADER
The name of the header that contains the RSocket frame type being processed.
|
static RSocketFrameTypeMessageCondition |
REQUEST_CONDITION
Condition to match one of the 4 stream request types.
|
| Constructor and Description |
|---|
RSocketFrameTypeMessageCondition(Collection<io.rsocket.frame.FrameType> frameTypes) |
RSocketFrameTypeMessageCondition(io.rsocket.frame.FrameType... frameType) |
| Modifier and Type | Method and Description |
|---|---|
RSocketFrameTypeMessageCondition |
combine(RSocketFrameTypeMessageCondition other)
Define the rules for combining this condition with another.
|
int |
compareTo(RSocketFrameTypeMessageCondition other,
Message<?> message)
Compare this condition to another in the context of a specific message.
|
protected Collection<?> |
getContent()
Return the collection of objects the message condition is composed of
(e.g.
|
static io.rsocket.frame.FrameType |
getFrameType(Message<?> message)
Find the RSocket frame type in the message headers.
|
Set<io.rsocket.frame.FrameType> |
getFrameTypes() |
RSocketFrameTypeMessageCondition |
getMatchingCondition(Message<?> message)
Check if this condition matches the given Message and returns a
potentially new condition with content tailored to the current message.
|
protected String |
getToStringInfix()
The notation to use when printing discrete items of content.
|
equals, hashCode, toStringpublic static final String FRAME_TYPE_HEADER
public static final RSocketFrameTypeMessageCondition CONNECT_CONDITION
public static final RSocketFrameTypeMessageCondition REQUEST_CONDITION
public RSocketFrameTypeMessageCondition(io.rsocket.frame.FrameType... frameType)
public RSocketFrameTypeMessageCondition(Collection<io.rsocket.frame.FrameType> frameTypes)
public Set<io.rsocket.frame.FrameType> getFrameTypes()
protected Collection<?> getContent()
AbstractMessageConditionnull.getContent in class AbstractMessageCondition<RSocketFrameTypeMessageCondition>protected String getToStringInfix()
AbstractMessageConditiongetToStringInfix in class AbstractMessageCondition<RSocketFrameTypeMessageCondition>@Nullable public static io.rsocket.frame.FrameType getFrameType(Message<?> message)
message - the current messagenull if not foundpublic RSocketFrameTypeMessageCondition combine(RSocketFrameTypeMessageCondition other)
MessageConditionother - the condition to combine withpublic RSocketFrameTypeMessageCondition getMatchingCondition(Message<?> message)
MessageConditionnull if there is no match.public int compareTo(RSocketFrameTypeMessageCondition other, Message<?> message)
MessageConditionMessageCondition.getMatchingCondition(Message) to ensure they have content
relevant to current message only.