Class NetTracer

java.lang.Object
de.christofreichardt.diagnosis.AbstractTracer
de.christofreichardt.diagnosis.net.NetTracer

public class NetTracer extends AbstractTracer
This particular tracer logs over the network.
Author:
Christof Reichardt
  • Field Details

    • TIMEOUT

      public static final int TIMEOUT
      See Also:
    • defaultPortNo

      protected final int defaultPortNo
      the default port
      See Also:
    • portNo

      protected int portNo
      the debug server's port number
    • hostName

      protected String hostName
      the host name of the debug server
    • pizzaConnection

      protected Socket pizzaConnection
      the pizza connection to the debug server
  • Constructor Details

    • NetTracer

      public NetTracer(String name)
  • Method Details

    • getPortNo

      public int getPortNo()
      Returns:
      the portNo
    • setPortNo

      public void setPortNo(int portNo)
      Parameters:
      portNo - the portNo to set
    • getHostName

      public String getHostName()
      Returns:
      the hostName
    • setHostName

      public void setHostName(String hostName)
      Parameters:
      hostName - the hostName to set
    • readConfiguration

      protected void readConfiguration(XPath xpath, Node node) throws XPathExpressionException, AbstractTracer.Exception
      Description copied from class: AbstractTracer
      Reads the configuration for this particular tracer instance by evaluating the given node with the given xpath engine.
      Overrides:
      readConfiguration in class AbstractTracer
      Parameters:
      xpath - the xpath engine
      node - the config node
      Throws:
      XPathExpressionException - indicates xpath problems
      AbstractTracer.Exception - indicates problems when configuring certain tracer instances
    • open

      public void open()
      Opens the associated TracePrintStream by wrapping the socket streams.
      Specified by:
      open in class AbstractTracer
    • close

      public void close()
      Closes the associated TracePrintStream.
      Specified by:
      close in class AbstractTracer
    • sendUserCredentials

      protected void sendUserCredentials() throws UnknownHostException
      Collects some user credentials and sends them over the network.
      Throws:
      UnknownHostException - if the local host name could not be resolved into an address