|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.Element
com.edustructures.sifworks.SIFElement
com.edustructures.sifworks.SIFMessagePayload
public abstract class SIFMessagePayload
A specialization of SIFElement for SIF infrastructure messages such as SIF_Register, SIF_Request, and SIF_Event.
SIFMessagePayload provides methods specific to infrastructure messages, such
as retrieving the SIF_Header or its individual fields. When an instance of
this class is constructed, it is done so without its SIF_Header element. The
getHeader method adds a SIF_Header child if one does not exist,
and the class framework takes care of assigning values to the header prior to
sending messages.
For consistency the ADK employs the same SIFElement class hierarchy and conventions for SIF Infrastructure messages as it does for SIF Data Objects. Some inherited methods of SIFElement, such as setChanged and setEmpty, have no effect for infrastructure messages.
| Field Summary |
|---|
| Fields inherited from class com.edustructures.sifworks.Element |
|---|
CURRENT_SERIALIZE_VERSION |
| Constructor Summary | |
|---|---|
SIFMessagePayload(ElementDef metadata)
Constructor |
|
| Method Summary | |
|---|---|
SIF_Ack |
ackError(int category,
int code,
java.lang.String desc)
Deprecated. Please use the overload of this method that accepts a SIFErrorCategory as the first parameter |
SIF_Ack |
ackError(int category,
int code,
java.lang.String desc,
java.lang.String extDesc)
Deprecated. Please use the overload of this method that accepts a SIFErrorCategory as the first parameter |
SIF_Ack |
ackError(SIFErrorCategory category,
int code,
java.lang.String desc)
Create an error SIF_Ack for this message. |
SIF_Ack |
ackError(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc)
Create an error SIF_Ack for this message. |
SIF_Ack |
ackFinal()
Create a Final SIF_Ack for this message. |
SIF_Ack |
ackImmediate()
Create an Immediate SIF_Ack for this message. |
SIF_Ack |
ackIntermediate()
Create an Intermediate SIF_Ack for this message. |
SIF_Ack |
ackStatus(int code)
Create a SIF_Ack for this message. |
java.lang.String |
getDestinationId()
Gets the SIF_DestinationId value from this message's header. |
SIF_Header |
getHeader()
Returns the SIF_Header element. |
java.lang.String |
getMsgId()
Gets the SIF_MsgId value from this message's header. |
java.util.List<SIFContext> |
getSIFContexts()
Gets the list of SIFContexts associated with this message. |
SIFVersion |
getSIFVersion()
Gets the SIF Version to which this message conforms. |
java.lang.String |
getSourceId()
Gets the SIF_SourceId value from this message's header. |
java.util.Calendar |
getTimestamp()
Gets the timestamp of this message from the SIF_Timestamp element in the header. |
java.lang.String |
getVersionAttribute()
Returns the Version attribute of this SIF_Message. |
java.lang.String |
getXmlns()
Returns the XML namespace of this message |
void |
LogRecv(org.apache.log4j.Category log)
Utility method called by the class framework to log this SIF_Message upon receipt from a zone. |
void |
LogSend(org.apache.log4j.Category log)
Utility method called by the class framework to log this SIF_Message prior to sending it to a zone. |
void |
setSIFVersion(SIFVersion ver)
Sets the SIF Version to which this SIF_Message conforms. |
void |
setVersionAttribute(java.lang.String version)
Sets the Version attribute of this SIF_Message. |
void |
setXmlns(java.lang.String xmlns)
Sets the XML namespace of this message |
| Methods inherited from class com.edustructures.sifworks.SIFElement |
|---|
addChild, addChild, clone, compareGraphTo, create, effectiveSIFVersion, getChild, getChild, getChild, getChild, getChild, getChildCount, getChildList, getChildList, getChildList, getChildren, getChildren, getContent, getContent, getField, getField, getFieldCount, getFields, getFieldValue, getKey, getSIFValue, getTextValue, getXmlId, hasTextValue, removeChild, removeChild, removeChild, removeChild, restoreImplementationDef, setChanged, setChildren, setEmpty, setField, setField, setField, setField, setSIFValue, setTextValue, setXmlId, tag |
| Methods inherited from class com.edustructures.sifworks.Element |
|---|
compareTo, getElementDef, getParent, getRoot, isChanged, isDoNotEncode, isEmpty, setChanged, setDoNotEncode, setElementDef, setEmpty, setParent, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SIFMessagePayload(ElementDef metadata)
| Method Detail |
|---|
public SIF_Header getHeader()
public java.lang.String getXmlns()
public void setXmlns(java.lang.String xmlns)
public java.lang.String getVersionAttribute()
The Version attribute was introduced in SIF 1.1, which uses the attribute to identify the version of SIF to which a message conforms. Prior versions of SIF encode the version in the namespace.
public void setVersionAttribute(java.lang.String version)
The Version attribute was introduced in SIF 1.1
version - The text for the Version attributepublic SIFVersion getSIFVersion()
The SIF Version is determined by first inspecting the Version attribute of the SIF_Message. If present, that attribute identifies the version of SIF to which the version conforms. If not present, the namespace is inspected; if it is in the form "http://www.sifinfo.org/v1.0r1/messages", it is parsed to obtain the version of SIF. If it is in the form "http://www.sifinfo.org/infrastructure/1.x" and no Version attribute is present, the version of SIF is assumed to be "1.1"
getSIFVersion in class SIFElementpublic void setSIFVersion(SIFVersion ver)
If the supplied version if SIF 1.1 or later, the Version attribute is assigned a value and the xmlns attribute is set to "http://www.sifinfo.org/infrastructure/major.x". Otherwise, the Version attribute is not set and the xmlns attribute is set to "http://www.sifinfo.org/vversion/messages"
setSIFVersion in class SIFElementA - SIFVersion instance encapsulating the version of the SIF
Specification to which this message conformspublic java.lang.String getMsgId()
If the message does not have a SIF_Header element, one is created.
public java.lang.String getSourceId()
If the message does not have a SIF_Header element, one is created.
public java.lang.String getDestinationId()
If the message does not have a SIF_Header element, one is created.
public java.util.Calendar getTimestamp()
If the message does not have a SIF_Header element, one is created with a timestamp equal to the current time.
public java.util.List<SIFContext> getSIFContexts()
public SIF_Ack ackImmediate()
public SIF_Ack ackIntermediate()
public SIF_Ack ackFinal()
public SIF_Ack ackStatus(int code)
code - The SIF_Status/SIF_Code value
public SIF_Ack ackError(int category,
int code,
java.lang.String desc)
category - The value of the SIF_Error/SIF_Category elementcode - The value of the SIF_Error/SIF_Code elementdesc - The value of the SIF_Error/SIF_Desc element
public SIF_Ack ackError(SIFErrorCategory category,
int code,
java.lang.String desc)
category - The value of the SIF_Error/SIF_Category elementcode - The value of the SIF_Error/SIF_Code elementdesc - The value of the SIF_Error/SIF_Desc element
public SIF_Ack ackError(int category,
int code,
java.lang.String desc,
java.lang.String extDesc)
category - The value of the SIF_Error/SIF_Category elementcode - The value of the SIF_Error/SIF_Code elementdesc - The value of the SIF_Error/SIF_Desc elementextDesc - The value of the SIF_Error/SIF_ExtendedDesc element
public SIF_Ack ackError(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc)
category - The value of the SIF_Error/SIF_Category elementcode - The value of the SIF_Error/SIF_Code elementdesc - The value of the SIF_Error/SIF_Desc elementextDesc - The value of the SIF_Error/SIF_ExtendedDesc element
public void LogSend(org.apache.log4j.Category log)
log - The Log4j Category instance representing the destination Zonepublic void LogRecv(org.apache.log4j.Category log)
log - The Log4j Category instance representing the source Zone
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||