org.simpleframework.transport.trace
Interface Agent


public interface Agent

The Agent object represents a tracing agent used to monitor events on a connection. Its primary responsibilities are to create Trace objects that are attached to a specific socket channel. When any event occurs on that channel the trace is notified and can forward the details on to the agent for analysis.

An agent implementation must make sure that it does not affect the performance of the server. If there are delays creating a trace or within the trace itself it will have an impact on performance.

Author:
Niall Gallagher
See Also:
Trace

Method Summary
 Trace attach(SocketChannel channel)
          This method is used to attach a trace to the specified channel.
 void stop()
          This is used to stop the agent and clear all trace information.
 

Method Detail

attach

Trace attach(SocketChannel channel)
This method is used to attach a trace to the specified channel. Attaching a trace basically means associating events from that trace with the specified socket. It ensures that the events from a specific channel can be observed in isolation.

Parameters:
channel - this is the channel to associate with the trace
Returns:
this returns a trace associated with the channel

stop

void stop()
This is used to stop the agent and clear all trace information. Stopping the agent is typically done when the server is stopped and is used to free any resources associated with the agent. If an agent does not hold information this method can be ignored.



Copyright © 2013. All Rights Reserved.