com.ibm.manplato
Interface ConduitManager
- All Known Implementing Classes:
- Synchronizer
- public interface ConduitManager
An interface for applications that wish to manage Conduit access.
This interface provides the mechanism by which the ConduitManager accesses data.
Generally at the start of sync, the Synchronizer class will collect
information that may be useful to Conduits. This interface provides
a mechanism for the ConduitHandler to request this information from the
underlying synchronization application.
- Version:
- $Rev$-$Date: 2001/03/15 16:55:29 $$State: Exp $
- Author:
- File Created By: Brad BARCLAY <bbarclay@ca.ibm.com>, Last Modified By: $Author: Yaztromo $
Method Summary |
void |
appendToPalmSyncLog(java.lang.String text)
Appends a string to the Palm's Sync Log. |
java.util.Vector |
getDBInfo()
Retrieves the database info vector. |
DLPDatabaseInfo |
getDBInfo(java.lang.String s)
Returns a database information object for the specified, named database. |
DLPVersion |
getDLPVersion()
Retrieves the DLP version number. |
boolean |
getPopupState()
Returns the desired popup state. |
DLPStorageInfo |
getStorageInfo()
Retrieves the storage information object from the remote device. |
DLPSystemInfo |
getSystemInfo()
Retrieves hardware system information from the remote device. |
DLPUserInfo |
getUserInfo()
Retrieves the user info object for the remote device. |
boolean |
isModemListener()
This method is used to determine if this ManplatoSync instance
is listening to a serial port with a cradle, or a serial port with
a modem attached. |
void |
postToLog(java.lang.String s)
Posts the desired string to the synchronization log. |
void |
setStatus(java.lang.String s)
Sets the desired status message on the host side status display. |
appendToPalmSyncLog
public void appendToPalmSyncLog(java.lang.String text)
- Appends a string to the Palm's Sync Log.
To increase speed and reduce packet overhead, ManplatoSync does
not write through each and every request to add something to the Palm's
sync log. Instead, it collocts this information, and then sends it all
at once at the end of sync. Data passed into this method should collect
this data, and process it approperiately.
- Parameters:
text
- an entry for the Palm's sync log. Note that in general these
are provided without a carrige return or linefeed at the end, so you'll
have to provide them yourself, as necessary.the
- String to append to the Palm sync log.
getDBInfo
public java.util.Vector getDBInfo()
- Retrieves the database info vector.
At the start of synchronization, ManplatoSync queries all
of the databases for their information, and stores them in a
set of DLPDatabaseInfo blocks inside a Vector.
Calls to this method return this vector.
Note that the data within this vector may be slightly out of date,
as other Conduits may have modified these databases since the
database info vector was built.
- Returns:
- a Vector containing DLPDatabaseInfo objects.
getDBInfo
public DLPDatabaseInfo getDBInfo(java.lang.String s)
throws DatabaseNotFoundException
- Returns a database information object for the specified, named database.
This method will return the DLPDatabaseInfo object corresponding the the specified
named database, if it exists. Note that in the typical ManplatoSync
implementation, this data is retrieved from the database info Vector, as opposed
to directly from the Palm, meaning the info can be slightly out of date.
Conduits that need up-to-date info should query the database info directly.
- Parameters:
s
- the database name to retrieve info for.- Returns:
- the requested database info object.
- Throws:
DatabaseNotFoundException
- if the named database does not exist on this device.
getDLPVersion
public DLPVersion getDLPVersion()
- Retrieves the DLP version number.
Some jCondiuts may want to call methods which are only available on
specific versions of the DLP protocol. At the start of sync, ManplatoSync
reads the DLP version number, and stores it for later use. This method
will return this value.
- Returns:
- a DLPVersion object containing the DLP version number for the attached device.
getPopupState
public boolean getPopupState()
- Returns the desired popup state.
Some Conduits may want to display their own GUI progress panels.
However, the user may find this visually distracting. This option
should be queried by all Conduits that wish to popup a panel during sync
to determine wether or not to display their panels.
GUI synchronizers should set this to the value specified by the user.
Note that non-GUI synchronizers should set this to false.
- Returns:
- true if the user will allow popups, false otherwise.
getStorageInfo
public DLPStorageInfo getStorageInfo()
- Retrieves the storage information object from the remote device.
Typically, this data is read at the start of sync by the synchronization
application. This method exposes this information for Conduits to read.
- Returns:
- the DLPStorageInfo object associated with the attached synchronization device.
getSystemInfo
public DLPSystemInfo getSystemInfo()
- Retrieves hardware system information from the remote device.
- Returns:
- the DLPSystemInfo object associated with the remote device.
getUserInfo
public DLPUserInfo getUserInfo()
- Retrieves the user info object for the remote device.
User information is read and stored at the start of sync.
This method allows Conduits to query this information.
- Returns:
- the DLPUserInfo object associated with the user info on the remote device.
isModemListener
public boolean isModemListener()
- This method is used to determine if this ManplatoSync instance
is listening to a serial port with a cradle, or a serial port with
a modem attached.
- Returns:
- true if the attached serial device is a modem, false otherwise.
postToLog
public void postToLog(java.lang.String s)
- Posts the desired string to the synchronization log.
Calls to this method add the specified string to the host-side
synchronization log.
- Parameters:
s
- the String to appond to the sync log.
setStatus
public void setStatus(java.lang.String s)
- Sets the desired status message on the host side status display.
Calls to this method are similar to postToLog, however they are intended
for important status update information. Note that it most implementations,
messages posted via this method should also be writte to the synchronization log.
- Parameters:
s
- the String to post to the status display.