本文整理了Java中io.rsocket.Frame.ensureFrameType()
方法的一些代码示例,展示了Frame.ensureFrameType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.ensureFrameType()
方法的具体详情如下:
包路径:io.rsocket.Frame
类名称:Frame
方法名:ensureFrameType
暂无
代码示例来源:origin: rsocket/rsocket-java
public static int requestN(final Frame frame) {
ensureFrameType(FrameType.REQUEST_N, frame);
return RequestNFrameFlyweight.requestN(frame.content);
}
}
代码示例来源:origin: rsocket/rsocket-java
public static String dataMimeType(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.dataMimeType(frame.content);
}
}
代码示例来源:origin: rsocket/rsocket-java
public static String message(Frame frame) {
ensureFrameType(FrameType.ERROR, frame);
return ErrorFrameFlyweight.message(frame.content);
}
}
代码示例来源:origin: rsocket/rsocket-java
public static int getFlags(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
final int flags = FrameHeaderFlyweight.flags(frame.content);
return flags & SetupFrameFlyweight.VALID_FLAGS;
}
代码示例来源:origin: rsocket/rsocket-java
public static boolean hasRespondFlag(final Frame frame) {
ensureFrameType(FrameType.KEEPALIVE, frame);
final int flags = FrameHeaderFlyweight.flags(frame.content);
return (flags & KeepaliveFrameFlyweight.FLAGS_KEEPALIVE_R)
== KeepaliveFrameFlyweight.FLAGS_KEEPALIVE_R;
}
}
代码示例来源:origin: rsocket/rsocket-java
public static int numberOfRequests(final Frame frame) {
ensureFrameType(FrameType.LEASE, frame);
return LeaseFrameFlyweight.numRequests(frame.content);
}
}
代码示例来源:origin: rsocket/rsocket-java
public static boolean isRequestChannelComplete(final Frame frame) {
ensureFrameType(FrameType.REQUEST_CHANNEL, frame);
final int flags = FrameHeaderFlyweight.flags(frame.content);
return (flags & FrameHeaderFlyweight.FLAGS_C) == FrameHeaderFlyweight.FLAGS_C;
}
}
代码示例来源:origin: rsocket/rsocket-java
public static int keepaliveInterval(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.keepaliveInterval(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static int ttl(final Frame frame) {
ensureFrameType(FrameType.LEASE, frame);
return LeaseFrameFlyweight.ttl(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static int version(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.version(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static int maxLifetime(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.maxLifetime(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static String metadataMimeType(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.metadataMimeType(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static int errorCode(final Frame frame) {
ensureFrameType(FrameType.ERROR, frame);
return ErrorFrameFlyweight.errorCode(frame.content);
}
代码示例来源:origin: rsocket/rsocket-java
public static ConnectionSetupPayload create(final Frame setupFrame) {
Frame.ensureFrameType(FrameType.SETUP, setupFrame);
return new DefaultConnectionSetupPayload(setupFrame);
}
代码示例来源:origin: io.rsocket/rsocket-core
public static int maxLifetime(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.maxLifetime(frame.content);
}
代码示例来源:origin: io.rsocket/rsocket-core
public static int getFlags(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
final int flags = FrameHeaderFlyweight.flags(frame.content);
return flags & SetupFrameFlyweight.VALID_FLAGS;
}
代码示例来源:origin: io.rsocket/rsocket-core
public static String dataMimeType(final Frame frame) {
ensureFrameType(FrameType.SETUP, frame);
return SetupFrameFlyweight.dataMimeType(frame.content);
}
}
代码示例来源:origin: io.rsocket/rsocket-core
public static boolean isRequestChannelComplete(final Frame frame) {
ensureFrameType(FrameType.REQUEST_CHANNEL, frame);
final int flags = FrameHeaderFlyweight.flags(frame.content);
return (flags & FrameHeaderFlyweight.FLAGS_C) == FrameHeaderFlyweight.FLAGS_C;
}
}
代码示例来源:origin: io.rsocket/rsocket-core
public static String message(Frame frame) {
ensureFrameType(FrameType.ERROR, frame);
return ErrorFrameFlyweight.message(frame.content);
}
}
代码示例来源:origin: io.rsocket/rsocket-core
public static int requestN(final Frame frame) {
ensureFrameType(FrameType.REQUEST_N, frame);
return RequestNFrameFlyweight.requestN(frame.content);
}
}
内容来源于网络,如有侵权,请联系作者删除!