org.tranche.remote
Class RemoteTrancheServerPerformanceListener

java.lang.Object
  extended by org.tranche.remote.RemoteTrancheServerPerformanceListener
All Implemented Interfaces:
RemoteTrancheServerListener

public class RemoteTrancheServerPerformanceListener
extends java.lang.Object
implements RemoteTrancheServerListener

A listener than uses the ConnectionDiagnosticsLog to gather stats about a server.

Note that the ConnectionDiagnosticsLog can be shared between multiple listeners. This class is thread safe.

Author:
Bryan Smith - bryanesmith@gmail.com

Constructor Summary
RemoteTrancheServerPerformanceListener(ConnectionDiagnosticsLog connectionDiagnosticsLog, java.lang.String host, int id)
          A listener than uses the ConnectionDiagnosticsLog to gather stats about a server.
 
Method Summary
 void downMessageCompleted(ServerMessageDownEvent smde)
          A notification that an inbound message has been completed.
 void downMessageFailed(ServerMessageDownEvent smde)
          A notification that an inbound message has failed.
 void downMessageProgress(ServerMessageDownEvent smde)
          A notification that an inbound message is being downloaded.
 void downMessageStarted(ServerMessageDownEvent smde)
          A notification that an inbound message has been started.
 boolean equals(java.lang.Object o)
           
 int hashCode()
          So can assert that RTS doesn't have already.
 void requestCreated(ServerCallbackEvent sce)
          A notification that a server request has been created.
 void requestFailed(ServerCallbackEvent sce)
          A notification that a server request has failed.
 void requestFulfilled(ServerCallbackEvent sce)
          A notification that a server request has been fulfilled by the server.
 void serverBanned(ServerEvent se)
          A notification that a server has been banned.
 void serverConnect(ServerEvent se)
          A notification that a server has been connected to.
 void serverUnbanned(ServerEvent se)
          A notification that a server has been unbanned.
 void upMessageCreated(ServerMessageUpEvent smue)
          A notification that an outbound message has been created.
 void upMessageFailed(ServerMessageUpEvent smue)
          A notification that an outbound message has failed.
 void upMessageSent(ServerMessageUpEvent smue)
          A notification that an outbound message has been sent.
 void upMessageStarted(ServerMessageUpEvent smue)
          A notification that an outbound message has started to be sent.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteTrancheServerPerformanceListener

public RemoteTrancheServerPerformanceListener(ConnectionDiagnosticsLog connectionDiagnosticsLog,
                                              java.lang.String host,
                                              int id)

A listener than uses the ConnectionDiagnosticsLog to gather stats about a server.

Note that the ConnectionDiagnosticsLog can be shared between multiple listeners. This class is thread safe.

Parameters:
connectionDiagnosticsLog -
host -
id -
Method Detail

serverConnect

public void serverConnect(ServerEvent se)

A notification that a server has been connected to.

Specified by:
serverConnect in interface RemoteTrancheServerListener
Parameters:
se -

serverBanned

public void serverBanned(ServerEvent se)

A notification that a server has been banned.

Specified by:
serverBanned in interface RemoteTrancheServerListener
Parameters:
se -

serverUnbanned

public void serverUnbanned(ServerEvent se)

A notification that a server has been unbanned.

Specified by:
serverUnbanned in interface RemoteTrancheServerListener
Parameters:
se -

upMessageCreated

public void upMessageCreated(ServerMessageUpEvent smue)

A notification that an outbound message has been created.

Specified by:
upMessageCreated in interface RemoteTrancheServerListener
Parameters:
smue -

upMessageStarted

public void upMessageStarted(ServerMessageUpEvent smue)

A notification that an outbound message has started to be sent.

Specified by:
upMessageStarted in interface RemoteTrancheServerListener
Parameters:
smue -

upMessageSent

public void upMessageSent(ServerMessageUpEvent smue)

A notification that an outbound message has been sent.

Specified by:
upMessageSent in interface RemoteTrancheServerListener
Parameters:
smue -

upMessageFailed

public void upMessageFailed(ServerMessageUpEvent smue)

A notification that an outbound message has failed.

Specified by:
upMessageFailed in interface RemoteTrancheServerListener
Parameters:
smue -

downMessageStarted

public void downMessageStarted(ServerMessageDownEvent smde)

A notification that an inbound message has been started.

Specified by:
downMessageStarted in interface RemoteTrancheServerListener
Parameters:
smde -

downMessageProgress

public void downMessageProgress(ServerMessageDownEvent smde)

A notification that an inbound message is being downloaded.

Specified by:
downMessageProgress in interface RemoteTrancheServerListener
Parameters:
smde -

downMessageCompleted

public void downMessageCompleted(ServerMessageDownEvent smde)

A notification that an inbound message has been completed.

Specified by:
downMessageCompleted in interface RemoteTrancheServerListener
Parameters:
smde -

downMessageFailed

public void downMessageFailed(ServerMessageDownEvent smde)

A notification that an inbound message has failed.

Specified by:
downMessageFailed in interface RemoteTrancheServerListener
Parameters:
smde -

requestCreated

public void requestCreated(ServerCallbackEvent sce)

A notification that a server request has been created.

Specified by:
requestCreated in interface RemoteTrancheServerListener
Parameters:
sce -

requestFulfilled

public void requestFulfilled(ServerCallbackEvent sce)

A notification that a server request has been fulfilled by the server.

Specified by:
requestFulfilled in interface RemoteTrancheServerListener
Parameters:
sce -

requestFailed

public void requestFailed(ServerCallbackEvent sce)

A notification that a server request has failed.

Specified by:
requestFailed in interface RemoteTrancheServerListener
Parameters:
sce -

hashCode

public int hashCode()

So can assert that RTS doesn't have already.

Overrides:
hashCode in class java.lang.Object
Returns:

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license