xmlBlaster 2.1.0 API

org.xmlBlaster.util.queuemsg
Class DummyEntry

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

public class DummyEntry
extends MsgQueueEntry

See Also:
Serialized Form

Field Summary
private  byte[] content
           
static java.lang.String ENTRY_TYPE
           
private static java.util.logging.Logger log
           
static java.lang.String ME
           
private static long serialVersionUID
           
private  long sizeOfMsg
           
 
Fields inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
entryType, glob, persistent, priority, redeliverCounter, refToCloneOrigin, returnObj, storageId, uniqueIdString, uniqueIdTimestamp, wantReturnObj
 
Constructor Summary
DummyEntry(Global glob, PriorityEnum priority, StorageId storageId, boolean persistent)
           
DummyEntry(Global glob, PriorityEnum priority, StorageId storageId, long sizeOfMsg, boolean persistent)
           
DummyEntry(Global glob, PriorityEnum priority, Timestamp timestamp, StorageId storageId, long sizeOfMsg, boolean persistent)
          This constructor is for internal creation from persistence only (passing the original timestamp).
DummyEntry(Global glob, PriorityEnum priority, Timestamp timestamp, StorageId storageId, long sizeInBytes, byte[] content, boolean persistent)
          Called by ClientEntryFactory and ServerEntryFactory only
 
Method Summary
 void embeddedObjectToXml(java.io.OutputStream out, java.util.Properties props)
          Dump content to xml representation
 java.lang.Object getEmbeddedObject()
          This constructor is for internal creation from persistence only (passing the original timestamp).
 java.lang.String getEmbeddedType()
          Gets the type of the object embedded in this entry, how the object is serialized.
 java.lang.String getKeyOid()
           
 MsgUnit getMsgUnit()
           
 SessionName getReceiver()
           
 SessionName getSender()
           
 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 setPersistent(boolean persistent)
          Note: Setting here is probably buggy as on reload from DB it seems to be handled as transient if embedded MsgUnit is not persistent.
 
Methods inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
added, clone, compare, equals, finalize, getLogId, getMeat, getMethodName, getPriority, getPriorityEnum, getRedeliverCounter, getRef, getReturnObj, getStorageId, getUniqueId, getUniqueIdLong, incrRedeliverCounter, isPersistent, isStored, removed, setGlobal, setRefToCloneOrigin, setReturnObj, setStored, setWantReturnObject, toString, toXml, toXml, wantReturnObj
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

log

private static java.util.logging.Logger log

ME

public static final java.lang.String ME
See Also:
Constant Field Values

ENTRY_TYPE

public static final java.lang.String ENTRY_TYPE
See Also:
Constant Field Values

sizeOfMsg

private long sizeOfMsg

content

private byte[] content
Constructor Detail

DummyEntry

public DummyEntry(Global glob,
                  PriorityEnum priority,
                  Timestamp timestamp,
                  StorageId storageId,
                  long sizeOfMsg,
                  boolean persistent)
This constructor is for internal creation from persistence only (passing the original timestamp).


DummyEntry

public DummyEntry(Global glob,
                  PriorityEnum priority,
                  Timestamp timestamp,
                  StorageId storageId,
                  long sizeInBytes,
                  byte[] content,
                  boolean persistent)
Called by ClientEntryFactory and ServerEntryFactory only


DummyEntry

public DummyEntry(Global glob,
                  PriorityEnum priority,
                  StorageId storageId,
                  boolean persistent)

DummyEntry

public DummyEntry(Global glob,
                  PriorityEnum priority,
                  StorageId storageId,
                  long sizeOfMsg,
                  boolean persistent)
Method Detail

getEmbeddedObject

public java.lang.Object getEmbeddedObject()
This constructor is for internal creation from persistence only (passing the original timestamp).


isExpired

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

Specified by:
isExpired in class MsgQueueEntry

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

getSender

public final SessionName getSender()
Specified by:
getSender in class MsgQueueEntry
Returns:
The name of the sender (data source) or null

getReceiver

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

getKeyOid

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

getMsgUnit

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

getEmbeddedType

public java.lang.String getEmbeddedType()
Description copied from interface: I_Entry
Gets the type of the object embedded in this entry, how the object is serialized.

Specified by:
getEmbeddedType in interface I_Entry
Overrides:
getEmbeddedType in class MsgQueueEntry
Returns:
MethodName.xxx

isInternal

public boolean isInternal()
Specified by:
isInternal in class MsgQueueEntry
Returns:
If it is an internal message (oid starting with "_").

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

setPersistent

public final void setPersistent(boolean persistent)
Description copied from class: MsgQueueEntry
Note: Setting here is probably buggy as on reload from DB it seems to be handled as transient if embedded MsgUnit is not persistent. Workaround: Always set this flag on MsgUnit directly until a test case is implemented 2010-11-16 Marcel, Michele

Overrides:
setPersistent in class MsgQueueEntry

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

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.