|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.distribute.NetarkivetMessage
public abstract class NetarkivetMessage
Common base class for all messages exchanged in the NetarchiveSuite.
Field Summary | |
---|---|
(package private) static java.lang.String |
ERROR_DELIMITTER
|
protected java.lang.String |
replyOfId
|
Constructor Summary | |
---|---|
protected |
NetarkivetMessage(ChannelID to,
ChannelID replyTo)
Creates a new NetarkivetMessage. |
Method Summary | |
---|---|
java.lang.String |
getErrMsg()
Retrieve error message. |
java.lang.String |
getID()
Retrieve message id. |
java.lang.String |
getReplyOfId()
Retrieve replyOfId. |
ChannelID |
getReplyTo()
Retrieve specified reply channel. |
ChannelID |
getTo()
Retrieve initial destination. |
boolean |
hasBeenSent()
Check, if a given message has been sent yet. |
boolean |
isOk()
Did an error occur when processing the message. |
void |
setNotOk(java.lang.String err)
Set or append error message. |
void |
setNotOk(java.lang.Throwable e)
Set error message based on an exception. |
java.lang.String |
toString()
Returns a string containing: |
(package private) void |
updateId(java.lang.String newId)
Sets the ID of this message if it has not already been set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final java.lang.String ERROR_DELIMITTER
protected java.lang.String replyOfId
Constructor Detail |
---|
protected NetarkivetMessage(ChannelID to, ChannelID replyTo)
to
- the initial receiver of the messagereplyTo
- the initial sender of the message
ArgumentNotValid
- if to==replyTo, the replyTo parameter is a
topic instead of a queue, or there is a null parameter.Method Detail |
---|
public boolean isOk()
public void setNotOk(java.lang.String err)
err
- error messagepublic void setNotOk(java.lang.Throwable e)
e
- An exception thrown during processing.public java.lang.String getErrMsg() throws PermissionDenied
PermissionDenied
- if the message is not an error messagepublic java.lang.String getID()
PermissionDenied
- If the message has not yet been sent.void updateId(java.lang.String newId)
newId
- The new IDpublic java.lang.String getReplyOfId()
public ChannelID getTo()
public ChannelID getReplyTo()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasBeenSent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |