net.sf.infrared.agent.transport
Class SocketForwarder

java.lang.Object
  extended bynet.sf.infrared.agent.transport.SocketForwarder
All Implemented Interfaces:
Forwarder

public class SocketForwarder
extends Object
implements Forwarder

Forwarder which uses a socket to send statistics to the remote infrared web application


Constructor Summary
SocketForwarder(String hostName, int portNo)
           
 
Method Summary
 void destroy()
          This is to inform the forwarder that it has been destroyed, all cleanup activities need to be handled by this method.
 void forward(Statistics stats)
          Forward the collected statistics to the central store
 void forward(Statistics[] stats)
          Variant for handling collection of unmerged stats
 void init(boolean suspended)
          This is to inform the forwarder to perform initialization.
 void resume()
          Infrom the forwarder to resume operation
 void suspend()
          Inform the forwarder to suspend operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketForwarder

public SocketForwarder(String hostName,
                       int portNo)
Method Detail

init

public void init(boolean suspended)
Description copied from interface: Forwarder
This is to inform the forwarder to perform initialization.

Specified by:
init in interface Forwarder
Parameters:
suspended - - whether the forwarded needs to be initialized in a suspended state.

forward

public void forward(Statistics stats)
Description copied from interface: Forwarder
Forward the collected statistics to the central store

Specified by:
forward in interface Forwarder
Parameters:
stats -

forward

public void forward(Statistics[] stats)
Description copied from interface: Forwarder
Variant for handling collection of unmerged stats

Specified by:
forward in interface Forwarder
Parameters:
stats -

suspend

public void suspend()
Description copied from interface: Forwarder
Inform the forwarder to suspend operation

Specified by:
suspend in interface Forwarder

resume

public void resume()
Description copied from interface: Forwarder
Infrom the forwarder to resume operation

Specified by:
resume in interface Forwarder

destroy

public void destroy()
Description copied from interface: Forwarder
This is to inform the forwarder that it has been destroyed, all cleanup activities need to be handled by this method.

Specified by:
destroy in interface Forwarder