Class TraceInfo

  • java.lang.Object
    • com.tibco.tibjms.admin.TraceInfo

  • public class TraceInfo
    extends java.lang.Object
    This class represents the set of trace message types that will be output to a particular output destination (console or log file). The trace parameters consist of three sets of TRACE_* items that are evaluated as follows:
    1) Absolute items (setTraceItems) are the starting point for the set of trace items that will be logged.
    2) Add items (addTraceItems) are then added to the list of absolute items (duplicates are ignored).
    3) Remove items (removeTraceItems) are then removed from the list above to get the final list of items.

    setTraceItems() always overwrites the list of absolute items. addTraceItems() and removeTraceItems() append to their respective lists of trace items. To reset all or part of the trace parameters, use the clear*() methods.
    • Constructor Detail

      • TraceInfo

        public TraceInfo()
        Public constuctor that creates a TraveInfo with TRACE_DEFAULT set. This is the same as using the constructor TraceInfo(TRACE_DEFAULT,0,0);
      • TraceInfo

        public TraceInfo​(long set,
                         long add,
                         long remove)
        Public constructor used to create a new TraceInfo object. The values passed to this constructor can be a single TRACE_* constant or a set of TRACE_* constants combined with the binary OR operator (|).
        Parameters:
        set - The set of absolute trace items for this TraceInfo.
        add - The set of add trace items for this TraceInfo.
        remove - The set of remove trace items for this TraceInfo.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • setTraceItems

        public void setTraceItems​(long set)
        Set the absolute trace items for this TraceInfo. This method overwrites any absolute trace items that were previously set in this object. The current add and remove trace items will not be effected by this call. To directly specify exactly what will be traced, first call clearAllTraceItems() and then set the desired items with this method.
        Parameters:
        set - The set of absolute trace items for this TraceInfo. Can be a single TRACE_* constant or a set of TRACE_* constants combined with the binary OR operator (|).
      • addTraceItems

        public void addTraceItems​(long add)
        Add the specified trace items to the current list of add trace items. Any duplicate items will be ignored. To reset the list of add trace items, call clearAddTraceItems() first.
        Parameters:
        add - The set of trace items to append to the list of add trace items. Can be a single TRACE_* constant or a set of TRACE_* constants combined with the binary OR operator (|).
      • removeTraceItems

        public void removeTraceItems​(long remove)
        Add the specified trace items to the current list of remove trace items. Any duplicate items will be ignored. To reset the list of remove trace items, call clearRemoveTraceItems() first.
        Parameters:
        remove - The set of trace items to append to the list of remove trace items. Can be a single TRACE_* constant or a set of TRACE_* constants combined with the binary OR operator (|).
      • getTraceSetItems

        public long getTraceSetItems()
        Get the set of absolute trace items. To determine if particular TRACE_* item is in the set use bitwise AND (&).
        Returns:
        the set of absolute trace items as a long.
      • getTraceAddItems

        public long getTraceAddItems()
        Get the set of add trace items. To determine if particular TRACE_* item is in the set use bitwise AND (&).
        Returns:
        the set of add trace items as a long.
      • getTraceRemoveItems

        public long getTraceRemoveItems()
        Get the set of remove trace items. To determine if particular TRACE_* item is in the set use bitwise AND (&).
        Returns:
        the set of remove trace items as a long.
      • clearSetTraceItems

        public void clearSetTraceItems()
        Clear the set of absolute trace items so that it is empty.
      • clearAddTraceItems

        public void clearAddTraceItems()
        Clear the set of add trace items so that it is empty.
      • clearRemoveTraceItems

        public void clearRemoveTraceItems()
        Clear the set of remove trace items so that it is empty.
      • clearAllTraceItems

        public void clearAllTraceItems()
        Clear the set of absolute, add, and remove trace items so the object is essentially empty.
      • getAllTraceItems

        public long getAllTraceItems()
        Get the calculated set of trace items. This is calculated by taking the absolute set of trace items, adding the set of add trace items, and then removing the set of remove trace items.
        Returns:
        the calculated set of trace items.
      • hasItems

        public boolean hasItems​(long traceItems)
        Determine if a set of trace items will be logged based on the setting in this TraceInfo.
        Parameters:
        traceItems - The trace items to test for. Can be a single TRACE_* constant or a set of TRACE_* constants combined with the binary OR operator (|).
        Returns:
        true if the TraceInfo object has all of the items set, false otherwise.
      • toString

        public java.lang.String toString()
        Generate a string representation of this TraceInfo.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of this TraceInfo.
      • from

        public static TraceInfo from​(javax.management.openmbean.CompositeData cd)
        For Internal use only, may be removed or deprecated in future.
        Returns:
        a TraceInfo object from CompositeData
        Throws:
        java.lang.IllegalArgumentException - if CompositeType does not match or if a null CompositeData is passed.