xmlBlaster 2.2.0 client API

org.xmlBlaster.client.queuemsg
Class MsgQueueSubscribeEntry

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

public final class MsgQueueSubscribeEntry
extends MsgQueueEntry

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

Author:
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
MsgQueueSubscribeEntry(Global glob, PriorityEnum priority, StorageId storageId, Timestamp timestamp, long sizeInBytes, QueryKeyData subscribeKeyData, QueryQosData subscribeQosData)
          For persistence recovery
MsgQueueSubscribeEntry(Global glob, StorageId storageId, QueryKeyData subscribeKeyData, QueryQosData subscribeQosData)
          Use this constructor if a new message object is fed by method subscribe().
 
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
 java.lang.Object getEmbeddedObject()
          The embeddded object for this implementing class is an Object[2] where Object[0] = qos.toXml() Object[1] = key.toXml()
 java.lang.String getKeyOid()
           
 MsgUnit getMsgUnit()
           
 Timestamp getRcvTimestamp()
          return null
 SessionName getReceiver()
           
 SessionName getSender()
          Access the unique login name of the subscriber.
 long getSizeInBytes()
          Try to find out the approximate memory consumption of this message in RAM.
 QueryKeyData getSubscribeKeyData()
           
 QueryQosData getSubscribeQosData()
           
 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

MsgQueueSubscribeEntry

public MsgQueueSubscribeEntry(Global glob,
                              StorageId storageId,
                              QueryKeyData subscribeKeyData,
                              QueryQosData subscribeQosData)
                       throws XmlBlasterException
Use this constructor if a new message object is fed by method subscribe().

Throws:
XmlBlasterException

MsgQueueSubscribeEntry

public MsgQueueSubscribeEntry(Global glob,
                              PriorityEnum priority,
                              StorageId storageId,
                              Timestamp timestamp,
                              long sizeInBytes,
                              QueryKeyData subscribeKeyData,
                              QueryQosData subscribeQosData)
For persistence recovery

Method Detail

isExpired

public 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 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()

getSubscribeQosData

public QueryQosData getSubscribeQosData()

getSubscribeKeyData

public QueryKeyData getSubscribeKeyData()

getMsgUnit

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

getSender

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

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

setReceiver

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

getReceiver

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

getKeyOid

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

getRcvTimestamp

public Timestamp getRcvTimestamp()
return null


getEmbeddedObject

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


getSizeInBytes

public 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 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.