Class SocketTrace

java.lang.Object
org.simpleframework.transport.connect.SocketTrace
All Implemented Interfaces:
Trace

class SocketTrace extends Object implements Trace
The SocketTrace is used to wrap an trace for safety. Wrapping an trace in this way ensures that even if the trace is badly written there is little chance that it will affect the operation of the server.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Trace
    This is the actual trace that is being wrapped by this.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the SocketTrace object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    trace(Object event)
    This method is used to accept an event that occurred on the socket associated with this trace.
    void
    trace(Object event, Object value)
    This method is used to accept an event that occurred on the socket associated with this trace.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • trace

      private final Trace trace
      This is the actual trace that is being wrapped by this.
  • Constructor Details

    • SocketTrace

      public SocketTrace(Trace trace)
      Constructor for the SocketTrace object. This will create a trace object that wraps the one provided. If the provided trace is null then this will simply ignore all events.
      Parameters:
      trace - this is the trace that is to be wrapped by this
  • Method Details

    • trace

      public void trace(Object event)
      This method is used to accept an event that occurred on the socket associated with this trace. Typically the event is a symbolic description of the event such as an enum or a string.
      Specified by:
      trace in interface Trace
      Parameters:
      event - this is the event that occurred on the socket
    • trace

      public void trace(Object event, Object value)
      This method is used to accept an event that occurred on the socket associated with this trace. Typically the event is a symbolic description of the event such as an enum or a string.
      Specified by:
      trace in interface Trace
      Parameters:
      event - this is the event that occurred on the socket
      value - provides additional information such as an exception