|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.msgsys.MessageType
public class MessageType
Message type object. Message types have a name and a number. The
message number is assigned when the MessageType is added to a
MessageCatalog
.
Applications should declare static MessageType
instances using intern(java.lang.String)
and reuse that object. For example:
public static MessageType MSG_TYPE_SKY_FALLING = MessageType.intern("me.SKY_FALLING");It is suggested that the MessageType string name be derived from the program identifier. Atavism reserves all names beginning with "ao.".
Field Summary | |
---|---|
protected static java.util.Map<java.lang.String,MessageType> |
internedMsgTypes
|
protected java.lang.Integer |
msgTypeNumber
|
protected java.lang.String |
msgTypeString
|
Constructor Summary | |
---|---|
|
MessageType()
No argument constructor is needed for marshalling. |
protected |
MessageType(java.lang.String msgTypeString)
|
Method Summary | |
---|---|
int |
getMsgTypeNumber()
Get message type number. |
java.lang.String |
getMsgTypeString()
Get message type name. |
static MessageType |
intern(java.lang.String typeName)
Get singleton MessageType instance for a message type name. |
void |
marshalObject(AOByteBuffer buf)
Internal use only. |
static MessageType |
readObjectUtility(java.io.ObjectInputStream in)
Internal use only. |
void |
setMsgTypeNumber(int msgTypeNumber)
Set message type number. |
java.lang.String |
toString()
|
java.lang.Object |
unmarshalObject(AOByteBuffer buf)
Internal use only. |
static void |
writeObjectUtility(java.io.ObjectOutputStream out,
MessageType type)
Internal use only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.util.Map<java.lang.String,MessageType> internedMsgTypes
protected transient java.lang.String msgTypeString
protected transient java.lang.Integer msgTypeNumber
Constructor Detail |
---|
public MessageType()
protected MessageType(java.lang.String msgTypeString)
Method Detail |
---|
public int getMsgTypeNumber()
public void setMsgTypeNumber(int msgTypeNumber)
MessageCatalog
to assign a number.
public java.lang.String getMsgTypeString()
public static MessageType intern(java.lang.String typeName)
public java.lang.String toString()
toString
in class java.lang.Object
public static MessageType readObjectUtility(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static void writeObjectUtility(java.io.ObjectOutputStream out, MessageType type) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void marshalObject(AOByteBuffer buf)
marshalObject
in interface Marshallable
buf
- The byte bufferpublic java.lang.Object unmarshalObject(AOByteBuffer buf)
unmarshalObject
in interface Marshallable
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |