synapsi.main
Interface MainForNet

All Known Implementing Classes:
TestMain, NeuronServer

public interface MainForNet

Interface to access synapsi.net package.


Method Summary
 void ClientActivate(java.lang.String IP)
          Called by the thread listening for client state changes from roammate server.
 void ClientDeactivate(java.lang.String IP)
          Called by the thread listening for client state changes from roammate.
 int setClientVersion(java.lang.String clientIP, byte[] MD5, java.lang.String version)
          Notifies when a client's version number has changed.
 void threadEnd()
          Callback for notifying main that an update has ended and a new thread can start updating.
 int threadStart(UpdateThread t)
          Callback for checking if update protocol can proceed to uploading
 

Method Detail

setClientVersion


public int setClientVersion(java.lang.String clientIP,
                            byte[] MD5,
                            java.lang.String version)
Notifies when a client's version number has changed.
Parameters:
clientIP - The IP of the client.
MD5 - MD5-sum of clients current version.
version - The new version of the client.
Returns:
0 if successful, else nonzero.

threadStart


public int threadStart(UpdateThread t)
Callback for checking if update protocol can proceed to uploading
Parameters:
t - UpdateThread calling this method.
Returns:
0 if ok to proceed, negative if not.

threadEnd


public void threadEnd()
Callback for notifying main that an update has ended and a new thread can start updating.

ClientActivate


public void ClientActivate(java.lang.String IP)
Called by the thread listening for client state changes from roammate server.
Parameters:
IP - IP of the client to be activated,

ClientDeactivate


public void ClientDeactivate(java.lang.String IP)
Called by the thread listening for client state changes from roammate.
Parameters:
IP - IP of the client to be deactivated.