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
Match connection-level frames "SETUP" or "METADATA_PUSH".
|
static RSocketFrameTypeMessageCondition |
EMPTY_CONDITION
Empty condition that does not match to any RSocket frames (e.g.
|
static String |
FRAME_TYPE_HEADER
The name of the header that contains the RSocket frame type being processed.
|
static RSocketFrameTypeMessageCondition |
REQUEST_CHANNEL_CONDITION
Match RSocket frame "REQUEST_CHANNEL".
|
static RSocketFrameTypeMessageCondition |
REQUEST_CONDITION
Deprecated.
as of 5.2.2 because matching to all interaction types is too
flexible. Please use one of the other constants in this class that match
to specific frames.
|
static RSocketFrameTypeMessageCondition |
REQUEST_FNF_OR_RESPONSE_CONDITION
Match RSocket frames "REQUEST_FNF" or "REQUEST_RESPONSE".
|
static RSocketFrameTypeMessageCondition |
REQUEST_RESPONSE_CONDITION
Match RSocket frame "REQUEST_RESPONSE".
|
static RSocketFrameTypeMessageCondition |
REQUEST_STREAM_CONDITION
Match RSocket frame "REQUEST_STREAM".
|
| 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.
|
static RSocketFrameTypeMessageCondition |
getCondition(int cardinalityIn,
int cardinalityOut)
Return a condition for matching the RSocket request interaction type with
that is selected based on the delcared request and response cardinality
of some handler method.
|
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_FNF_OR_RESPONSE_CONDITION
public static final RSocketFrameTypeMessageCondition REQUEST_RESPONSE_CONDITION
public static final RSocketFrameTypeMessageCondition REQUEST_STREAM_CONDITION
public static final RSocketFrameTypeMessageCondition REQUEST_CHANNEL_CONDITION
public static final RSocketFrameTypeMessageCondition EMPTY_CONDITION
@Deprecated 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.public static RSocketFrameTypeMessageCondition getCondition(int cardinalityIn, int cardinalityOut)
The table below shows the selections made:
| Request Cardinality | Response Cardinality | Interaction Types |
|---|---|---|
| 0,1 | 0 | Fire-And-Forget, Request-Response |
| 0,1 | 1 | Request-Response |
| 0,1 | 2 | Request-Stream |
| 2 | Any | Request-Channel |
cardinalityIn - -- the request cardinality: 1 for a single payload,
2 for many payloads, and 0 if input is not handled.cardinalityOut - -- the response cardinality: 0 for no output
payloads, 1 for a single payload, and 2 for many payloads.