Package org.objectweb.joram.mom.util
Class MessageIdListImpl
- java.lang.Object
-
- org.objectweb.joram.mom.util.MessageIdListImpl
-
- All Implemented Interfaces:
Encodable,Serializable,MessageIdList
public class MessageIdListImpl extends Object implements MessageIdList, Encodable, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageIdListImpl.MessageIdListImplEncodableFactory
-
Field Summary
Fields Modifier and Type Field Description private ArrayList<String>listprivate StringlistIdprivate static longserialVersionUIDdefine serialVersionUID for interoperability, fix with 5.15.0 value-
Fields inherited from interface fr.dyade.aaa.common.encoding.Encodable
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
-
-
Constructor Summary
Constructors Constructor Description MessageIdListImpl()MessageIdListImpl(String listId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, String msgId, boolean persistent)The indicator 'persistent' is ignored because the list is stored as a whole.voidadd(String msgId, boolean persistent)The indicator 'persistent' is ignored because the list is stored as a whole.voidclear()booleancontains(String msgId)voiddecode(Decoder decoder)Decodes the content of this objectvoiddelete()Deletes the list from the persistent storage.voidencode(Encoder encoder)Encodes the content of this objectStringget(int index)intgetEncodableClassId()Returns a unique class identifier.intgetEncodedSize()Returns the size of the byte array that results from the encoding of this object.booleanisEmpty()Iterator<String>iterator()Stringremove(int index)voidremove(String msgId)voidsave()Saves the list in the persistent storage.(package private) voidsetListId(String listId)intsize()String[]toArray(String[] array)StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability, fix with 5.15.0 value- See Also:
- Constant Field Values
-
listId
private String listId
-
-
Constructor Detail
-
MessageIdListImpl
public MessageIdListImpl()
-
MessageIdListImpl
public MessageIdListImpl(String listId)
-
-
Method Detail
-
setListId
void setListId(String listId)
-
size
public int size()
- Specified by:
sizein interfaceMessageIdList
-
toArray
public String[] toArray(String[] array)
- Specified by:
toArrayin interfaceMessageIdList
-
contains
public boolean contains(String msgId)
- Specified by:
containsin interfaceMessageIdList
-
add
public void add(String msgId, boolean persistent)
The indicator 'persistent' is ignored because the list is stored as a whole.- Specified by:
addin interfaceMessageIdList- Parameters:
msgId- the added message identifierpersistent- indicates whether the identifier should be persistently added or not
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceMessageIdList
-
remove
public String remove(int index)
- Specified by:
removein interfaceMessageIdList
-
get
public String get(int index)
- Specified by:
getin interfaceMessageIdList
-
remove
public void remove(String msgId)
- Specified by:
removein interfaceMessageIdList
-
add
public void add(int index, String msgId, boolean persistent)The indicator 'persistent' is ignored because the list is stored as a whole.- Specified by:
addin interfaceMessageIdList- Parameters:
index- the index of the added message identifiermsgId- the added message identifierpersistent- indicates whether the identifier should be persistently added or not
-
iterator
public Iterator<String> iterator()
- Specified by:
iteratorin interfaceMessageIdList
-
clear
public void clear()
- Specified by:
clearin interfaceMessageIdList
-
save
public void save() throws ExceptionDescription copied from interface:MessageIdListSaves the list in the persistent storage.- Specified by:
savein interfaceMessageIdList- Throws:
Exception
-
delete
public void delete()
Description copied from interface:MessageIdListDeletes the list from the persistent storage.- Specified by:
deletein interfaceMessageIdList
-
getEncodableClassId
public int getEncodableClassId()
Description copied from interface:EncodableReturns a unique class identifier.- Specified by:
getEncodableClassIdin interfaceEncodable- Returns:
- a unique class identifier
-
getEncodedSize
public int getEncodedSize() throws ExceptionDescription copied from interface:EncodableReturns the size of the byte array that results from the encoding of this object.- Specified by:
getEncodedSizein interfaceEncodable- Returns:
- the size of the encoded byte array
- Throws:
Exception- if an error occurs
-
encode
public void encode(Encoder encoder) throws Exception
Description copied from interface:EncodableEncodes the content of this object
-
decode
public void decode(Decoder decoder) throws Exception
Description copied from interface:EncodableDecodes the content of this object
-
-