|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Threads.Synchronizer
This class encapsulates the jSyncManagers synchronization engine as a seperate Runnable class, allowing it to be incorporated into multithreaded applications which listen to multiple synchronization ports at once.
Inner Class Summary | |
---|---|
(package private) class |
Synchronizer.ConduitList
|
Field Summary | |
---|---|
static java.lang.String |
author
This class variable holds the name and e-mail address of the Synchronization engine author. |
static int |
BACKUP_SYNC
Denotes the Backup sync type. |
java.io.PrintWriter |
logStream
This variable hold the reference to the PrintWriter to be used for writing log messages. |
static int |
NORMAL_SYNC
Denotes the "Normal" jConduit sync type. |
static int |
RESTORE_SYNC
Denotes the Restore sync type. |
boolean |
running
This variable hold the run state of the sync engine. |
protected static java.lang.String |
state
This class variable holds the state of this Synchronizer engine. |
java.io.PrintWriter |
statusStream
This variable hold the reference to the PrintWriter to be used for writing status messages. |
protected static java.lang.String |
version
This class variable holds the version of this Synchronizer Engine. |
Constructor Summary | |
---|---|
protected |
Synchronizer()
Basic class Constructor. |
|
Synchronizer(SLPTransportInterface transport,
SynchronizerListener listener)
Creates a new instance of the Synchronization engine. |
Method Summary | |
---|---|
void |
appendToPalmSyncLog(java.lang.String text)
Appends a string of text to the handhelds synchronization log. |
protected void |
finalize()
Code to perform when this object is garbage collected. |
java.util.Vector |
getDBInfo()
Retrieves a vector containing all the database info objects collected by this Synchronizer. |
DLPDatabaseInfo |
getDBInfo(java.lang.String s)
Retrieves the database info for the named database. |
DLPVersion |
getDLPVersion()
Returns the DLP version for the synchronizing device. |
static java.lang.String |
getHomeDirectory()
Retrieves the jSyncManager Home directory. |
boolean |
getPopupState()
Returns wether or not popups are allowed by jConduits. |
DLPStorageInfo |
getStorageInfo()
Retrieves the storage info for the synchronizing device. |
DLPSystemInfo |
getSystemInfo()
Retrieves the system info for the synchronizing device. |
DLPUserInfo |
getUserInfo()
Retrieves the user info for the synchronizing device. |
static java.lang.String |
getVersion()
Retrieves the version of this Synchronizer implementation. |
boolean |
isModemListener()
This method is used to determine if this jSyncManager instance is listening to a serial port with a cradle, or a serial port with a modem attached. |
void |
postToLog(java.lang.String s)
This method is called to post text information to the log stream. |
void |
run()
Used by java.lang.Thread to start executing the Synchronization engine. |
void |
setLogStream(java.io.PrintStream stream)
Sets the PrintSteam object that all logging information should be posted to. |
void |
setLogStream(java.io.PrintWriter stream)
Sets the PrintWriter object that all logging information should be posted to. |
void |
setStatus(java.lang.String s)
Writes a line of text to the status stream. |
void |
setStatusStream(java.io.PrintStream stream)
Sets the PrintSteam object that all sync status information should be posted to. |
void |
setStatusStream(java.io.PrintWriter stream)
Sets the PrintWriter object that all sync status information should be posted to. |
void |
stopSync()
Requests a stop to the synchronization engine. |
Methods inherited from class java.lang.Object |
---|
|
Field Detail |
public static final int NORMAL_SYNC
public static final int BACKUP_SYNC
public static final int RESTORE_SYNC
protected static final java.lang.String version
public static final java.lang.String author
protected static final java.lang.String state
public java.io.PrintWriter statusStream
public java.io.PrintWriter logStream
public volatile boolean running
Constructor Detail |
protected Synchronizer()
public Synchronizer(SLPTransportInterface transport, SynchronizerListener listener)
transport
- an instance of the Transport to use.syncSpeed
- the synchronization speed to use (for dock and modem sync).listener
- a handle to the class that implements SynchronizationListener.SynchronizerListener
Method Detail |
public void appendToPalmSyncLog(java.lang.String text)
appendToPalmSyncLog
in interface ConduitManager
text
- the text to append to the handhelds sync log.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
public java.util.Vector getDBInfo()
getDBInfo
in interface ConduitManager
public DLPDatabaseInfo getDBInfo(java.lang.String s) throws DatabaseNotFoundException
getDBInfo
in interface ConduitManager
s
- the name of the database to retreive the info object for.throws
- a DatabaseNotFoundException if the database named doesn't exist.public DLPVersion getDLPVersion()
getDLPVersion
in interface ConduitManager
public boolean getPopupState()
getPopupState
in interface ConduitManager
public DLPStorageInfo getStorageInfo()
getStorageInfo
in interface ConduitManager
public DLPSystemInfo getSystemInfo()
getSystemInfo
in interface ConduitManager
public DLPUserInfo getUserInfo()
getUserInfo
in interface ConduitManager
public boolean isModemListener()
isModemListener
in interface ConduitManager
public void postToLog(java.lang.String s)
postToLog
in interface ConduitManager
s
- the text to post to the log stream.public void run()
run
in interface java.lang.Runnable
public void setLogStream(java.io.PrintStream stream)
stream
- the PrintSteam object that all logging information should be posted to.public void setLogStream(java.io.PrintWriter stream)
stream
- the PrintWriter object that all logging information should be posted to.public void setStatus(java.lang.String s)
setStatus
in interface ConduitManager
s
- the text to post to the status stream.public void setStatusStream(java.io.PrintStream stream)
stream
- the PrintSteam object that all sync status information should be posted to.public void setStatusStream(java.io.PrintWriter stream)
stream
- the PrintWriter object that all sync status information should be posted to.public void stopSync()
public static java.lang.String getVersion()
public static java.lang.String getHomeDirectory()
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |