Class ProcessFlow


  • public final class ProcessFlow
    extends Packet
    Represents the Process Flow packet type which is used in the enter/leave methods in the Session class.

    A Process Flow entry is responsible for illustrated process and thread information.

    It has several properties which describe its creation context (like a thread ID, timestamp or hostname) and other properties which specify the way the Console interprets this packet (like the process flow ID). Furthermore, a Process Flow entry contains the actual data, namely the title, which will be displayed in the Console.

    This class is not guaranteed to be thread-safe. However, instances of this class will normally only be used in the context of a single thread.

    • Constructor Detail

      • ProcessFlow

        public ProcessFlow()
        Overloaded. Creates and initializes a ProcessFlow instance.
      • ProcessFlow

        public ProcessFlow​(ProcessFlowType processFlowType)
        Creates and initializes a ProcessFlow instance with a custom process flow type.

        If the processFlowType argument is a null reference a NullPointerException will be thrown.

        Parameters:
        processFlowType - The type of the new Process Flow entry describes the way the Console interprets this packet. Please see the ProcessFlowType enum for more information. Now allowed to be null
        Throws:
        NullPointerException - if the processFlowType argument is null
    • Method Detail

      • getSize

        public int getSize()
        Overridden. Returns the total occupied memory size of this Process Flow packet. The total occupied memory size of this Process Flow entry is the size of memory occupied by all strings and any internal data structures of this Process Flow entry.
        Specified by:
        getSize in class Packet
        Returns:
        The total occupied memory size of this Process Flow entry
      • getPacketType

        public PacketType getPacketType()
        Overridden. Returns PacketType.ProcessFlow.
        Specified by:
        getPacketType in class Packet
        Returns:
        PacketType.ProcessFlow. For a complete list of available packet types, please have a look at the documentation of the PacketType enum
      • getTitle

        public String getTitle()
        Returns the title of this Process Flow entry.

        This method can return null if this Process Flow entry does not contain a title. If this is the case, it will be empty in the SmartInspect Console.

        Returns:
        The title of the Process Flow or null if the title has not been set
      • setTitle

        public void setTitle​(String title)
        Sets the title of the Process Flow Entry.

        The title of this Process Flow entry will be empty in the SmartInspect Console when this method gets a null reference as argument.

        Parameters:
        title - The new title of this Process Flow entry. Can be null
      • getHostName

        public String getHostName()
        Returns the hostname of this Process Flow entry.

        The hostname of this Process Flow entry is usually set to the name of the machine this Process Flow entry is sent from.

        This method can return null if this Process Flow entry does not contain a hostname. If this is the case, it will be empty in the SmartInspect Console.

        Returns:
        The hostname of the machine, which sent this Process Flow entry or null if the hostname has not been set
      • setHostName

        public void setHostName​(String hostName)
        Sets the hostname of this Process Flow Entry.

        The hostname of this Process Flow entry will be empty in the SmartInspect Console when this method gets a null reference as argument.

        Parameters:
        hostName - The new hostname of this Process Flow entry. Can be null
      • getProcessFlowType

        public ProcessFlowType getProcessFlowType()
        Returns the type of this Process Flow entry.
        Returns:
        The type of the Process Flow entry. It describes the way the Console interprets this packet. Please see the ProcessFlowType enum for more information
      • setProcessFlowType

        public void setProcessFlowType​(ProcessFlowType processFlowType)
        Sets the type of this Process Flow entry.

        The type of the Process Flow entry describes the way the Console interprets this packet. Please see the ProcessFlowType enum for more information. If the processFlowType argument is a null reference a NullPointerException will be thrown.

        Parameters:
        processFlowType - The new type of this Process Flow entry. Not allowed to be null
        Throws:
        NullPointerException - if the processFlowType argument is null
      • getTimestamp

        public long getTimestamp()
        Returns the timestamp of this ProcessFlow object.
        Returns:
        The creation time of this Process Flow object as returned by the SmartInspect.now method
      • setTimestamp

        public void setTimestamp​(long timestamp)
        Sets the timestamp of this ProcessFlow object.
        Parameters:
        timestamp - The new timestamp of this ProcessFlow object. The passed value should represent the local date and time in microseconds since January 1, 1970. See SmartInspect.now() for more information
      • getProcessId

        public int getProcessId()
        Returns the process ID of this ProcessFlow object.
        Returns:
        The ID of the process this Process Flow object was created in
      • setProcessId

        public void setProcessId​(int processId)
        Sets the process ID of this ProcessFlow object.
        Parameters:
        processId - The new process ID of this Process Flow object
      • getThreadId

        public int getThreadId()
        Returns the thread ID of this ProcessFlow object.
        Overrides:
        getThreadId in class Packet
        Returns:
        The ID of the thread this Process Flow object was created in
      • setThreadId

        public void setThreadId​(int threadId)
        Sets the thread ID of this ProcessFlow object.
        Parameters:
        threadId - The new thread ID of this Process Flow object.