public final class Messages
extends java.lang.Object
| Constructor and Description |
|---|
Messages() |
| Modifier and Type | Method and Description |
|---|---|
static int |
calculateAlignedSize(int align,
int nonAlignedSize)
Calculate aligned message size.
|
static void |
cancelSubscriptionMessage(Transport transport,
int dataType,
int dataCount,
int sid,
int ioid)
Cancel subscription (aka event add) message.
|
static void |
clearChannelMessage(Transport transport,
int cid,
int sid)
Clear channel message.
|
static void |
createChannelMessage(Transport transport,
java.lang.String channelName,
int cid)
Create channel message.
|
static void |
createSubscriptionMessage(Transport transport,
int dataType,
int dataCount,
int sid,
int ioid,
int mask)
Create subscription (aka event add) message.
|
static void |
eventsOffSubscriptionMessage(Transport transport)
Events off message.
|
static void |
eventsOnSubscriptionMessage(Transport transport)
Events off message.
|
static void |
generateEchoMessage(Transport transport,
java.nio.ByteBuffer buffer)
Generate echo message.
|
static boolean |
generateRepeaterRegistration(java.nio.ByteBuffer buffer)
Generate repeater registration message.
|
static boolean |
generateSearchRequestMessage(Transport transport,
java.nio.ByteBuffer buffer,
java.lang.String name,
int cid)
Generate search request message.
|
static void |
generateVersionRequestMessage(Transport transport,
java.nio.ByteBuffer buffer,
short priority,
int sequenceNumber,
boolean isSequenceNumberValid)
Generate version request message.
|
static void |
hostNameMessage(Transport transport,
java.lang.String hostName)
Hostname message.
|
static void |
readNotifyMessage(Transport transport,
int dataType,
int dataCount,
int sid,
int ioid)
Read notify message.
|
static java.nio.ByteBuffer |
startCAMessage(Transport transport,
short command,
int payloadSize,
short dataType,
int dataCount,
int parameter1,
int parameter2)
Start CA message.
|
static void |
subscriptionUpdateMessage(Transport transport,
int dataType,
int dataCount,
int sid,
int ioid)
Update subscription message.
|
static void |
userNameMessage(Transport transport,
java.lang.String userName)
Username message.
|
static void |
versionMessage(Transport transport,
short priority,
int sequenceNumber,
boolean isSequenceNumberValid)
Version message.
|
static <T> void |
writeMessage(Transport transport,
int sid,
int cid,
TypeSupports.TypeSupport<T> typeSupport,
T value,
int count)
Write (best-effort) message.
|
static <T> void |
writeNotifyMessage(Transport transport,
int sid,
int ioid,
TypeSupports.TypeSupport<T> typeSupport,
T value,
int count)
Write notify message.
|
public static int calculateAlignedSize(int align,
int nonAlignedSize)
align - alignment to be used.nonAlignedSize - current non-aligned size.public static java.nio.ByteBuffer startCAMessage(Transport transport, short command, int payloadSize, short dataType, int dataCount, int parameter1, int parameter2)
transport - the transport,command - the CA commandpayloadSize - the size of the payload in bytes.dataType - the CA data type.dataCount - the CA element count.parameter1 - CA additional parameter 1parameter2 - CA additional parameter 2public static boolean generateRepeaterRegistration(java.nio.ByteBuffer buffer)
buffer - the buffer.public static boolean generateSearchRequestMessage(Transport transport, java.nio.ByteBuffer buffer, java.lang.String name, int cid)
transport - the transport.buffer - the buffer.name - the name.cid - the CA client ID.public static void generateVersionRequestMessage(Transport transport, java.nio.ByteBuffer buffer, short priority, int sequenceNumber, boolean isSequenceNumberValid)
transport - the transport.buffer - the buffer.priority - the message priority.sequenceNumber - the CA sequence number.isSequenceNumberValid - boolean switch which determines whether sequence number
or priority argument is used in the formatting of the message.public static void generateEchoMessage(Transport transport, java.nio.ByteBuffer buffer)
transport - the transport.buffer - the buffer.public static void versionMessage(Transport transport, short priority, int sequenceNumber, boolean isSequenceNumberValid)
transport - the transport.priority - the message priority.sequenceNumber - the CA message sequence number.isSequenceNumberValid - boolean switch which determines whether sequence number
or priority argument is used in the formatting of the message.public static void hostNameMessage(Transport transport, java.lang.String hostName)
transport - the transport.hostName - the IP or name of the host.public static void userNameMessage(Transport transport, java.lang.String userName)
transport - the transport.userName - the username.public static void createChannelMessage(Transport transport, java.lang.String channelName, int cid)
transport - the transport.channelName - the channelcid - the CA client ID.public static void readNotifyMessage(Transport transport, int dataType, int dataCount, int sid, int ioid)
transport - the transport.dataType - the CA data type.dataCount - the CA element count.sid - the CA Server ID.ioid - theCA message IOID.public static void createSubscriptionMessage(Transport transport, int dataType, int dataCount, int sid, int ioid, int mask)
transport - the transport.dataType - the CA data type.dataCount - the CA element count.sid - the CA Server ID.ioid - the CA message IOID.mask - the mask indicating which events are to be subscribed to.public static void cancelSubscriptionMessage(Transport transport, int dataType, int dataCount, int sid, int ioid)
transport - the transport.dataType - the CA data type.dataCount - the CA element count.sid - the CA Server ID.ioid - the CA message IOID.public static void clearChannelMessage(Transport transport, int cid, int sid)
transport - the transport.cid - the CA Client ID.sid - the CA Server ID.public static void subscriptionUpdateMessage(Transport transport, int dataType, int dataCount, int sid, int ioid)
transport - the transport.dataType - the CA data type.dataCount - the CA element count.sid - the CA Server ID.ioid - the CA message IOID.public static <T> void writeMessage(Transport transport, int sid, int cid, TypeSupports.TypeSupport<T> typeSupport, T value, int count)
T - the CA type to be transported.transport - the transport.sid - the CA Server ID.cid - the CA Client ID.typeSupport - the type support object.value - the CA value.count - the CA data element count.public static <T> void writeNotifyMessage(Transport transport, int sid, int ioid, TypeSupports.TypeSupport<T> typeSupport, T value, int count)
T - the CA type to be transported.transport - the transport.sid - the CA Server ID.ioid - the CA IOID.typeSupport - the type support object.value - the CA valuecount - the CA data element count.public static void eventsOffSubscriptionMessage(Transport transport)
transport - the transport.public static void eventsOnSubscriptionMessage(Transport transport)
transport - the transport.