jSyncManager

org.jSyncManager.Server
Class Server

java.lang.Object
  |
  +--org.jSyncManager.Server.Server
All Implemented Interfaces:
SynchronizerListener

public class Server
extends java.lang.Object
implements SynchronizerListener

Insert the type's description here.

Version:
$Revision: 1.10 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/06/26 02:25:24 $.

Inner Class Summary
(package private)  class Server.ExitThread
           
(package private)  class Server.LogPrintStream
           
 
Field Summary
static int NETSYNC_DEFAULT_NUMLISTENERS
           
static int NETSYNC_DEFAULT_PORT
           
 
Constructor Summary
Server()
          JSyncManagerServer constructor comment.
 
Method Summary
 void endOfSync(Synchronizer s)
          endOfSync method comment.
protected  void finalize()
           
 java.util.Vector getConduits(Synchronizer s)
          getConduits method comment.
 AbstractConduit getDefaultConduit(Synchronizer s)
          Retrieves the DefaultConduit object to be used at the end of a standard sync.
 DLPUserInfo getNewUserInfo(Synchronizer s)
          getNewUserInfo method comment.
 java.io.File getRestoreDatabasePath()
          Gets the database set to be used for the restore operation.
 int getSyncType(Synchronizer s)
          getSyncType method comment.
static void main(java.lang.String[] args)
          Starts the application.
 void midSync(Synchronizer s)
          midSync method comment.
 void processUser(DLPUserInfo userInfo, Synchronizer s)
          processUser method comment.
 void startOfSync(Synchronizer s)
          startOfSync method comment.
 void startServer()
           
 java.lang.Boolean stopServer(java.lang.String password)
          Informs the server to shutdown all operations.
 boolean useTimeSync(Synchronizer s)
          useTimeSync method comment.
 boolean validateUser(int userID, Synchronizer s)
          validateUser method comment.
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NETSYNC_DEFAULT_PORT

public static final int NETSYNC_DEFAULT_PORT

NETSYNC_DEFAULT_NUMLISTENERS

public static final int NETSYNC_DEFAULT_NUMLISTENERS
Constructor Detail

Server

public Server()
JSyncManagerServer constructor comment.
Method Detail

endOfSync

public void endOfSync(Synchronizer s)
endOfSync method comment.
Specified by:
endOfSync in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has completed a sync job.

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object

getConduits

public java.util.Vector getConduits(Synchronizer s)
getConduits method comment.
Specified by:
getConduits in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has completed a sync job.
Returns:
a Vector object containing the active instances of the conduits to be synchronized.

getDefaultConduit

public AbstractConduit getDefaultConduit(Synchronizer s)
Description copied from interface: SynchronizerListener
Retrieves the DefaultConduit object to be used at the end of a standard sync.
Specified by:
getDefaultConduit in interface SynchronizerListener
Returns:
org.jSyncManager.Conduit.DefaultConduit

getNewUserInfo

public DLPUserInfo getNewUserInfo(Synchronizer s)
getNewUserInfo method comment.
Specified by:
getNewUserInfo in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has completed a sync job.
Returns:
a DLPUserInfo object describing the new user, or null.

getSyncType

public int getSyncType(Synchronizer s)
getSyncType method comment.
Specified by:
getSyncType in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has completed a sync job.
Returns:
the type of synchronization to perform.

main

public static void main(java.lang.String[] args)
Starts the application.
Parameters:
args - an array of command-line arguments

midSync

public void midSync(Synchronizer s)
midSync method comment.
Specified by:
midSync in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has reached the mid-point of a sync job.

processUser

public void processUser(DLPUserInfo userInfo,
                        Synchronizer s)
processUser method comment.
Specified by:
processUser in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
userInfo - the DLPUserInfo object for the currently synchronizing handheld.
s - a reference to the Synchronizer that has completed a sync job.

startOfSync

public void startOfSync(Synchronizer s)
startOfSync method comment.
Specified by:
startOfSync in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has started a sync job.

startServer

public void startServer()

stopServer

public java.lang.Boolean stopServer(java.lang.String password)
                             throws java.lang.Exception
Informs the server to shutdown all operations.
Parameters:
the - remote administration password.
Returns:
a Boolean object representing the status of the request. true == request accepted, false otherwise.
Throws:
java.rmi.RemoteException - Any exception thrown while processing the request.

useTimeSync

public boolean useTimeSync(Synchronizer s)
useTimeSync method comment.
Specified by:
useTimeSync in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
s - a reference to the Synchronizer that has completed a sync job.
Returns:
true if the date/time should be synchronized, false otherwise.

validateUser

public boolean validateUser(int userID,
                            Synchronizer s)
validateUser method comment.
Specified by:
validateUser in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Parameters:
userID - int
s - a reference to the Synchronizer that has completed a sync job.
Returns:
true if the application is willing to allow this user to sync, false otherwise.

getRestoreDatabasePath

public java.io.File getRestoreDatabasePath()
Description copied from interface: SynchronizerListener
Gets the database set to be used for the restore operation. If the sync type equals Synchronizer.RESTORE_SYNC, this method will be called at sync time to retreive the File containing the directory with the databases to be restored.
Specified by:
getRestoreDatabasePath in interface SynchronizerListener
Following copied from interface: org.jSyncManager.API.Threads.SynchronizerListener
Returns:
the File object containing the directory of databases to be restored.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.