raccoon.api.eai.message
Interface ITracking

All Known Implementing Classes:
RvTracking

public interface ITracking

The purpose of ITracking is to provide support for end to end tracability of documents or messages throughout the system. It encapsulates information which is initiated by the first component to send a message (for example, a publishing adapter) and enriched by intermediate components (for example, TIBCO Integration Manager or receiving adapters).

ITracking information allows first to track a message back to its source when an error occured in any given component, and second to provide status information about the progress of a business process distributed among multiple components.

The tracking information includes :

  1. A unique TrackingID used to uniquely identify a single message throughout it's lifecycle.
  2. Application information that may enriched progressively.

Since:
Raccoon v0.7, refactored in Raccoon v1.0
Version:
$Id: ITracking.java,v 1.1 2004/08/08 20:25:56 crouvrais Exp $
Author:
Cedric ROUVRAIS

Method Summary
 void addApplicationInfo(java.lang.String pApplicationInfo)
          Adder method for applicationInfo.
 java.util.Iterator applicationInfo()
          Iterator on the elements within the collection applicationInfo.
 java.lang.String applicationInfoAt(int pIndex)
          Retrieves the application information at the specified position.
 int applicationInfoSize()
          Retrieves the number of elements within the collection applicationInfo.
 void assignAppInfo(java.util.Collection pApplicationInfo)
          Assigns to this instance the application information.
 boolean fromNative(java.lang.Object pNativeTracking)
          Extracts from the native message the tracking information fills in the fields of this object.
 java.util.ArrayList getApplicationInfo()
          Getter method for applicationInfo.
 java.lang.String getTrackingId()
          The global identifier that is unique.
 void setApplicationInfo(java.util.ArrayList pApplicationInfo)
          Defines the application information belonging to this instance.
 void setTrackingId(java.lang.String pTrackingId)
          Defines the string the uniquely identifies this element.
 java.lang.Object toNative()
          Converts this instance to the native representation used by the messaging layer.
 java.lang.String toString()
          Generates the String representation of this instance.
 

Method Detail

setTrackingId

void setTrackingId(java.lang.String pTrackingId)
                   throws java.lang.IllegalArgumentException
Defines the string the uniquely identifies this element.

Parameters:
pTrackingId - a unique string
Throws:
java.lang.IllegalArgumentException - if the tracking id is null

getTrackingId

java.lang.String getTrackingId()
The global identifier that is unique.

Returns:
the value of TrackingId

assignAppInfo

void assignAppInfo(java.util.Collection pApplicationInfo)
                   throws java.lang.IllegalArgumentException
Assigns to this instance the application information.

Parameters:
pApplicationInfo - a collection of string elements
Throws:
java.lang.IllegalArgumentException - if an element of the collection isn't a string instance.

setApplicationInfo

void setApplicationInfo(java.util.ArrayList pApplicationInfo)
                        throws java.lang.IllegalArgumentException
Defines the application information belonging to this instance.

Parameters:
pApplicationInfo - a collection of string
Throws:
java.lang.IllegalArgumentException - if an element of the collection isn't a string instance.

getApplicationInfo

java.util.ArrayList getApplicationInfo()
Getter method for applicationInfo.

Returns:
an ArrayList of String elements

applicationInfo

java.util.Iterator applicationInfo()
Iterator on the elements within the collection applicationInfo.

Returns:
the iterator of ApplicationInfo
See Also:
List.iterator()

applicationInfoSize

int applicationInfoSize()
Retrieves the number of elements within the collection applicationInfo.

Returns:
the size of ApplicationInfo

addApplicationInfo

void addApplicationInfo(java.lang.String pApplicationInfo)
Adder method for applicationInfo.

Parameters:
pApplicationInfo - the element to add to the collection
See Also:
List.add(java.lang.Object)

applicationInfoAt

java.lang.String applicationInfoAt(int pIndex)
                                   throws java.lang.IndexOutOfBoundsException
Retrieves the application information at the specified position.

Parameters:
pIndex - the position of the application information. Must be a value between 1 and applicationInfoSize()
Returns:
the string corresponding to the index.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds
See Also:
applicationInfoSize()

toNative

java.lang.Object toNative()
                          throws RaccoonException
Converts this instance to the native representation used by the messaging layer.

Returns:
the messaging layer object used to transmit tracking information
Throws:
RaccoonException - if the process fails to convert this element to a native tracking element.
RaccoonException - if the tracking id isn't assigned.

fromNative

boolean fromNative(java.lang.Object pNativeTracking)
                   throws java.lang.IllegalArgumentException
Extracts from the native message the tracking information fills in the fields of this object.

Parameters:
pNativeTracking - the native message containing the tracking element or the tracking element.
Returns:
true if the conversion was successful.
Throws:
java.lang.IllegalArgumentException - if the tracking id is null or contains only spaces.

toString

java.lang.String toString()
Generates the String representation of this instance.

The result should be something like this: ITracking[id="$TrackingId$", appInfo[id=1]="Some application info"]]

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object


Copyright null null. All Rights Reserved.