triptracker.client.net
Interface SocketListener

All Known Subinterfaces:
GPSSocketListener, MapSocketListener
All Known Implementing Classes:
GPSSocketAdapter, LoginForm, LoginForm, MainForm, MainFormController, MapSocketAdapter, MapViewPanel, RoutesForm

public interface SocketListener

Listener interface for a socket connection. SocketConnection.addListener(E) is used to register as a listener for server events and this interface specified what events can be triggered.


Method Summary
 void connectionUpdate(ConnectionState state)
          Invoked when the connection state of the underlying socket has changed.
 void invalidMessage(String message)
          Invoked when an invalid or unsupported message is received from the server.
 void socketError(IOException exception)
          Invoked when a socket error is encountered.
 

Method Detail

invalidMessage

void invalidMessage(String message)
Invoked when an invalid or unsupported message is received from the server. This happens when the message parser method (often SocketConnection.messageHandler(String)) fails to understand the message, or if it contains invalid data.

Parameters:
message - the message that triggered the event

socketError

void socketError(IOException exception)
Invoked when a socket error is encountered. This generally means that the socket has been closed or at least disconnected from the server.

Parameters:
exception - the error that triggered the event

connectionUpdate

void connectionUpdate(ConnectionState state)
Invoked when the connection state of the underlying socket has changed.

Parameters:
state - new connection state


Copyright © 2006 Team Trip Tracker. All Rights Reserved.