java.lang.Cloneable
public final class ConnectionMessage
extends java.lang.Object
implements java.lang.Cloneable
put
method several times with the same id will replace
attributes in the message.Constructor | Description |
---|---|
ConnectionMessage(int id) |
Creates the message.
|
ConnectionMessage(int id,
int attrCount) |
Creates the message with known attribute count.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(int id,
byte[] val) |
Adds binary (byte array) attribute to this message.
|
void |
add(int id,
int val) |
Adds integer attribute to this message.
|
void |
add(int id,
long val) |
Adds long attribute to this message.
|
void |
add(int id,
KeyValueCollection val) |
Adds KeyValueCollection attribute to this message.
|
void |
add(int id,
KeyValueCollection val,
java.lang.String encoding) |
Adds KeyValueCollection attribute to this message.
|
void |
add(int id,
java.lang.Integer val) |
Adds integer attribute to this message.
|
void |
add(int id,
java.lang.Long val) |
Adds long attribute to this message.
|
void |
add(int id,
java.lang.String val) |
Adds string attribute to this message.
|
java.lang.Object |
clone() |
|
java.lang.Object |
deleteAttrib(int id) |
Deletes attribute by ID.
|
int |
getAttributeCount() |
Gets number of attributes in this Message.
|
java.util.Iterator |
getAttributeIds() |
Gets attribute ids in this message as Iterator through
Integer objects. |
byte[] |
getBinary(int id) |
Gets binary (byte array) attribute value from the Message by ID.
|
java.util.Iterator |
getEntries() |
Gets attributes and their ids in this message as Iterator through
Map.Entry objects. |
java.lang.Integer |
getInt(int id) |
Gets integer attribute value from the Message by ID.
|
KeyValueCollection |
getKeyValueCollection(int id) |
Gets
KeyValueCollection attribute value from the Message by ID. |
KeyValueCollection |
getKeyValueCollection(int id,
java.lang.String encoding) |
Gets
KeyValueCollection attribute value from the Message by ID. |
java.lang.Long |
getLong(int id) |
Gets long attribute value from the Message by ID.
|
int |
getMessageId() |
Returns message id (type).
|
java.lang.Object |
getObject(int id) |
Gets attribute value from the Message by ID.
|
java.lang.String |
getString(int id) |
Gets string attribute value from the Message by ID.
|
java.lang.String |
toString() |
public ConnectionMessage(int id)
id
- message id (or type)public ConnectionMessage(int id, int attrCount)
id
- message id (or type)public int getMessageId()
public void add(int id, int val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, java.lang.Integer val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, long val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, java.lang.Long val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, java.lang.String val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, byte[] val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, KeyValueCollection val)
id
- Attribute IDval
- Attribute valuepublic void add(int id, KeyValueCollection val, java.lang.String encoding) throws java.io.UnsupportedEncodingException
id
- Attribute IDval
- Attribute valuejava.io.UnsupportedEncodingException
public java.lang.Object deleteAttrib(int id)
id
- Attribute IDnull
if no such attribute in the ConnectionMessage
public java.lang.Integer getInt(int id)
id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typepublic java.lang.Long getLong(int id)
id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typepublic java.lang.String getString(int id)
id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typepublic byte[] getBinary(int id)
id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typepublic KeyValueCollection getKeyValueCollection(int id)
KeyValueCollection
attribute value from the Message by ID.id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typepublic KeyValueCollection getKeyValueCollection(int id, java.lang.String encoding) throws java.io.UnsupportedEncodingException
KeyValueCollection
attribute value from the Message by ID.id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
or it has wrong typejava.io.UnsupportedEncodingException
public java.lang.Object getObject(int id)
id
- Attribute IDnull
if there is
no such attribute in the ConnectionMessage
public java.util.Iterator getAttributeIds()
Integer
objects.public java.util.Iterator getEntries()
Map.Entry
objects. The key in the entry is
Integer
object and the value is Object.public int getAttributeCount()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.