xmlBlaster 2.2.0 client API

org.xmlBlaster.client.queuemsg
Class MsgQueueConnectEntry

java.lang.Object
  extended by org.xmlBlaster.util.queuemsg.MsgQueueEntry
      extended by org.xmlBlaster.client.queuemsg.MsgQueueConnectEntry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, I_Entry, I_QueueEntry

public final class MsgQueueConnectEntry
extends MsgQueueEntry

Wraps an connect() message into an entry for a sorted queue.

Author:
michele@laghi.eu, xmlBlaster@marcelruff.info
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
entryType, glob, persistent, priority, redeliverCounter, refToCloneOrigin, returnObj, storageId, uniqueIdString, uniqueIdTimestamp, wantReturnObj
 
Constructor Summary
MsgQueueConnectEntry(Global glob, PriorityEnum priority, StorageId storageId, Timestamp timestamp, long sizeInBytes, ConnectQosData connectQosData)
          For persistence recovery
MsgQueueConnectEntry(Global glob, StorageId storageId, ConnectQosData connectQosData)
          Use this constructor if a new message object is fed by method connect().
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone
 void embeddedObjectToXml(java.io.OutputStream out, java.util.Properties props)
          Dump content to xml representation
 ConnectQosData getConnectQosData()
           
 java.lang.Object getEmbeddedObject()
          The embeddded object for this implementing class is an Object[1] where Object[0] = qos.toXml()
 java.lang.String getKeyOid()
           
 MsgUnit getMsgUnit()
           
 Timestamp getRcvTimestamp()
          return null
 SessionName getReceiver()
           
 SessionName getSender()
          Access the unique login name of the sender.
 long getSizeInBytes()
          Try to find out the approximate memory consumption of this message in RAM.
 boolean isDestroyed()
          Flag which marks the entry as destroyed, you should take it from queue and ignore/discard it
 boolean isExpired()
          Flag which marks the entry as outdated
 boolean isInternal()
           
 void setReceiver(SessionName receiver)
           
 
Methods inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
added, compare, equals, finalize, getEmbeddedType, getLogId, getMeat, getMethodName, getPriority, getPriorityEnum, getRedeliverCounter, getRef, getReturnObj, getStorageId, getUniqueId, getUniqueIdLong, incrRedeliverCounter, isPersistent, isStored, removed, setGlobal, setPersistent, setReturnObj, setStored, setWantReturnObject, toString, toXml, toXml, wantReturnObj
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MsgQueueConnectEntry

public MsgQueueConnectEntry(Global glob,
                            StorageId storageId,
                            ConnectQosData connectQosData)
                     throws XmlBlasterException
Use this constructor if a new message object is fed by method connect().

Throws:
XmlBlasterException

MsgQueueConnectEntry

public MsgQueueConnectEntry(Global glob,
                            PriorityEnum priority,
                            StorageId storageId,
                            Timestamp timestamp,
                            long sizeInBytes,
                            ConnectQosData connectQosData)
For persistence recovery

Method Detail

isExpired

public final boolean isExpired()
Description copied from class: MsgQueueEntry
Flag which marks the entry as outdated

Specified by:
isExpired in class MsgQueueEntry
See Also:
MsgQueueEntry.isExpired()

isDestroyed

public final boolean isDestroyed()
Description copied from class: MsgQueueEntry
Flag which marks the entry as destroyed, you should take it from queue and ignore/discard it

Specified by:
isDestroyed in class MsgQueueEntry
See Also:
MsgQueueEntry.isDestroyed()

getConnectQosData

public final ConnectQosData getConnectQosData()

getMsgUnit

public MsgUnit getMsgUnit()
Specified by:
getMsgUnit in class MsgQueueEntry
Returns:
null (always)

getSender

public final SessionName getSender()
Access the unique login name of the sender.

Specified by:
getSender in class MsgQueueEntry
Returns:
loginName of the data source
See Also:
MsgQueueEntry.getSender()

setReceiver

public final void setReceiver(SessionName receiver)
See Also:
MsgQueueEntry.getReceiver()

getReceiver

public final SessionName getReceiver()
Specified by:
getReceiver in class MsgQueueEntry
Returns:
The name of the receiver (data sink) or null
See Also:
MsgQueueEntry.getReceiver()

getKeyOid

public final java.lang.String getKeyOid()
Specified by:
getKeyOid in class MsgQueueEntry
Returns:
The message key oid or null
See Also:
MsgQueueEntry.getKeyOid()

getRcvTimestamp

public final Timestamp getRcvTimestamp()
return null


getEmbeddedObject

public java.lang.Object getEmbeddedObject()
The embeddded object for this implementing class is an Object[1] where Object[0] = qos.toXml()


getSizeInBytes

public final long getSizeInBytes()
Description copied from class: MsgQueueEntry
Try to find out the approximate memory consumption of this message in RAM.

NOTE: The derived classes need to add their data amount to this value.

Specified by:
getSizeInBytes in interface I_Entry
Overrides:
getSizeInBytes in class MsgQueueEntry
Returns:
the approximate size in bytes of this object which contributes to a QueueEntry memory consumption

isInternal

public final boolean isInternal()
Specified by:
isInternal in class MsgQueueEntry
Returns:
true

embeddedObjectToXml

public final void embeddedObjectToXml(java.io.OutputStream out,
                                      java.util.Properties props)
                               throws java.io.IOException
Description copied from interface: I_Entry
Dump content to xml representation

Parameters:
out - The stream to dump to
props - Control porperties
Throws:
java.io.IOException

clone

public java.lang.Object clone()
Returns a shallow clone

Overrides:
clone in class MsgQueueEntry

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.