xmlBlaster 2.2.0 client API

org.xmlBlaster.util.error
Class MsgErrorInfo

java.lang.Object
  extended by org.xmlBlaster.util.error.MsgErrorInfo
All Implemented Interfaces:
java.io.Serializable, I_MsgErrorInfo

public final class MsgErrorInfo
extends java.lang.Object
implements I_MsgErrorInfo, java.io.Serializable

Encapsulates all necessary information to allow error handling of a lost message.

Instances of this class are immutable.

Author:
xmlBlaster@marcelruff.info
See Also:
Serialized Form

Constructor Summary
MsgErrorInfo(Global glob, MsgQueueEntry[] msgQueueEntries, I_DispatchManager dispatchManager, java.lang.Throwable throwable)
          Creates an error info instance for an array of message queue entries
MsgErrorInfo(Global glob, MsgQueueEntry msgQueueEntry, I_DispatchManager dispatchManager, java.lang.Throwable throwable)
          Creates an error info instance with errorCode="internal.unknown"
MsgErrorInfo(Global glob, SessionName sessionName, MsgUnitRaw msgUnitRaw, java.lang.Throwable throwable)
          Called for raw messages e.g.
MsgErrorInfo(Global glob, SessionName sessionName, MsgUnit msgUnit, java.lang.Throwable throwable)
          Creates an error info instance from server side XmlBlasterImpl.publish failure (remote method invokation) without a queue involved
 
Method Summary
 I_DispatchManager getDispatchManager()
          Access the DispatchManager which holds the queue.
 Global getGlob()
           
 MsgQueueEntry[] getMsgQueueEntries()
          Access the message entry object to be handled
 MsgUnit getMsgUnit()
          Is not null for client calls into server like XmlBlasterImpl.publish() where no queue is involved.
 MsgUnitRaw getMsgUnitRaw()
          Is not null for client calls into server like XmlBlasterImpl.publish() where no queue is involved and the message could not be parsed.
 I_Queue getQueue()
          Access the queue where the entries are inside.
 SessionName getSessionName()
          Access the sender.
 XmlBlasterException getXmlBlasterException()
          Access the exception object describing the problem
 java.lang.String toString()
           
 java.lang.String toXml()
          Dump state of this object into XML.
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MsgErrorInfo

public MsgErrorInfo(Global glob,
                    SessionName sessionName,
                    MsgUnitRaw msgUnitRaw,
                    java.lang.Throwable throwable)
Called for raw messages e.g. during parsing problems. Creates an error info instance from server side XmlBlasterImpl.publish failure (remote method invokation) without a queue involved

Parameters:
sessionName - The sender client
msgUnitRaw - the message to handle, if it was not possible to parse it
throwable - Creates an error info instance with errorCode="internal.unknown"
if throwable instanceof XmlBlasterException we use the given exception

MsgErrorInfo

public MsgErrorInfo(Global glob,
                    SessionName sessionName,
                    MsgUnit msgUnit,
                    java.lang.Throwable throwable)
Creates an error info instance from server side XmlBlasterImpl.publish failure (remote method invokation) without a queue involved

Parameters:
sessionName - The sender client
msgUnit - the message to handle
throwable - Creates an error info instance with errorCode="internal.unknown"
if throwable instanceof XmlBlasterException we use the given exception

MsgErrorInfo

public MsgErrorInfo(Global glob,
                    MsgQueueEntry msgQueueEntry,
                    I_DispatchManager dispatchManager,
                    java.lang.Throwable throwable)
Creates an error info instance with errorCode="internal.unknown"

Parameters:
dispatchManager - The dispatchManager/queue where the entry is inside, null if the entry is not in a queue
throwable - Creates an error info instance with errorCode="internal.unknown"
if throwable instanceof XmlBlasterException we use the given exception

MsgErrorInfo

public MsgErrorInfo(Global glob,
                    MsgQueueEntry[] msgQueueEntries,
                    I_DispatchManager dispatchManager,
                    java.lang.Throwable throwable)
Creates an error info instance for an array of message queue entries

Parameters:
dispatchManager - The dispatchManager/queue where the entry is inside, null if the entry is not in a queue
throwable - Creates an error info instance with errorCode="internal.unknown"
if throwable instanceof XmlBlasterException we use the given exception
Method Detail

getMsgQueueEntries

public MsgQueueEntry[] getMsgQueueEntries()
Access the message entry object to be handled

Specified by:
getMsgQueueEntries in interface I_MsgErrorInfo
Returns:
never null

getQueue

public I_Queue getQueue()
Access the queue where the entries are inside.

Specified by:
getQueue in interface I_MsgErrorInfo
Returns:
null if entries are not in a queue

getDispatchManager

public I_DispatchManager getDispatchManager()
Description copied from interface: I_MsgErrorInfo
Access the DispatchManager which holds the queue.

Specified by:
getDispatchManager in interface I_MsgErrorInfo
Returns:
null if entries are not in a queue

getXmlBlasterException

public XmlBlasterException getXmlBlasterException()
Access the exception object describing the problem

Specified by:
getXmlBlasterException in interface I_MsgErrorInfo
Returns:
never null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXml

public final java.lang.String toXml()
Dump state of this object into XML.

Specified by:
toXml in interface I_MsgErrorInfo
Returns:
XML state of MsgErrorInfo

toXml

public final java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into XML.

Specified by:
toXml in interface I_MsgErrorInfo
Parameters:
extraOffset - indenting of tags
Returns:
XML state of MsgErrorInfo

getGlob

public Global getGlob()

getSessionName

public SessionName getSessionName()
Description copied from interface: I_MsgErrorInfo
Access the sender.

Specified by:
getSessionName in interface I_MsgErrorInfo
Returns:
null if not known

getMsgUnit

public MsgUnit getMsgUnit()
Description copied from interface: I_MsgErrorInfo
Is not null for client calls into server like XmlBlasterImpl.publish() where no queue is involved.

Specified by:
getMsgUnit in interface I_MsgErrorInfo
Returns:
null if not known

getMsgUnitRaw

public MsgUnitRaw getMsgUnitRaw()
Description copied from interface: I_MsgErrorInfo
Is not null for client calls into server like XmlBlasterImpl.publish() where no queue is involved and the message could not be parsed.

Specified by:
getMsgUnitRaw in interface I_MsgErrorInfo
Returns:
null if not known

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.