com.ibm.manplato.Conduit
Class Conduit
java.lang.Object
|
+--com.ibm.manplato.Conduit.Conduit
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AboutConduit, CDKJBridge, DefaultConduit, Deleter, Installer, TextDump
- public abstract class Conduit
- extends java.lang.Object
- implements java.io.Serializable
The abstract class representing a Conduit. All Conduits are derived from this class.
- Version:
- $Rev$-$Date: 2001/07/26 20:19:08 $$State: Exp $
- Author:
- File Created By: Brad BARCLAY <bbarclay@ca.ibm.com>, Last Modified By: $Author: schmidtd $
- See Also:
- Serialized Form
Constructor Summary |
Conduit()
The constructor used to initialize new Conduits. |
Method Summary |
java.lang.String |
getConduitName()
Returns the name of this Conduit for display. |
javax.swing.JPanel |
getConfigPanel()
Gets a handle to this Conduits configuration panel. |
java.lang.String |
getDescriptiveText()
Gets the description for this Conduit. |
protected java.util.ResourceBundle |
getResourceBundle()
Gets the Resource Bundle for this conduits resources. |
protected abstract java.lang.String |
getResourceBundleClassName()
Gets the fully-qualified classname for this conduits ResourceBundle class. |
byte |
getSyncPriorityLevel()
Returns this conduits desired sync priority level. |
abstract void |
startSync(ConduitHandler conduitHndlr,
DLPUserInfo userInfo)
This method is called when this Conduit is given the opportunity to synchronize. |
java.lang.String |
toString()
Returns the name of this Conduit. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Conduit
public Conduit()
- The constructor used to initialize new Conduits.
getConduitName
public java.lang.String getConduitName()
- Returns the name of this Conduit for display.
- Returns:
- the name of this Conduit.
getConfigPanel
public javax.swing.JPanel getConfigPanel()
- Gets a handle to this Conduits configuration panel.
In the GUI ManplatoSync applications, this method will be called at
Conduit initialization to get a handle to a Conduit-supplied configuration
JPanel, which will be added to the ManplatoSync Tabbed viewpane.
This method is not used in non-GUI ManplatoSync applications.
By default, this method returns null. When thi GUI client receives a null
handle, it will put together a basic page with information on this Conduit.
Override and implement this method to create a JPanel with any configuration
widgets you wish to use. It is up to you to provide your own event handlers
to manage the widgets inside the JPanel.
- Returns:
- a handle to a fully initialized JPanel.
getDescriptiveText
public java.lang.String getDescriptiveText()
- Gets the description for this Conduit.
This method should return null if a given Conduit does not
provide descriptive text for use by an application.
Note that the descriptive text may contin HTML. It should not be longer than
4 or 5 lines of text. Note that the text may be statically or dynamically
generated. The default implementation reads text from a resource file, however
this can be overridden.
- Returns:
- the text describing this conduit.
getResourceBundleClassName
protected abstract java.lang.String getResourceBundleClassName()
- Gets the fully-qualified classname for this conduits ResourceBundle class.
This method is used by the getResourceBundle() class.
Note that if you provide a null implementation for this method, you should
override the default implementations for getConduitName and getDescriptiveText,
to prevent them from returning null.
- Returns:
- a String containing the package and classname for this Conduits resources.
- See Also:
getConduitName
,
getDescriptiveText
getResourceBundle
protected java.util.ResourceBundle getResourceBundle()
throws java.util.MissingResourceException
- Gets the Resource Bundle for this conduits resources.
This method is called internally to retrieve a handle to this conduits
ResourceBundle class. Note that the default implementations of
getConduitName() and getDescriptiveText() call this method to retrieve
their resources.
- Returns:
- a handle to this Conduits ResourceBundle class.
- Throws:
java.util.MissingResourceException
- thrown when the resource bundle cannot be loaded.- See Also:
getConduitName
,
getDescriptiveText
getSyncPriorityLevel
public byte getSyncPriorityLevel()
- Returns this conduits desired sync priority level.
The value returned by this method may be used by some
ManplatoSync clients to determine the order in which conduits
are given the opportunity to sync with the handheld unit.
The return value is as a signed byte. Conduits that return
+127 will sync first, while conduits that return -128
will sync last. The default priority level is 0.
This method should only be overridden if a conduit must absolutely
run first, last, or if a set of conduits should always run in a
specific order.
- Returns:
- the priority level this conduit wishes to employ.
startSync
public abstract void startSync(ConduitHandler conduitHndlr,
DLPUserInfo userInfo)
throws NotConnectedException
- This method is called when this Conduit is given the opportunity to synchronize.
- Parameters:
conduitHndlr
- he handle to the active ConduitHandler to use for synchronization.userInfo
- the DLPUserInfo object for the user currently being synchronized.- Throws:
NotConnectedException
- thrown if the connection to the Palm is lost.- See Also:
ConduitHandler
,
DLPUserInfo
toString
public java.lang.String toString()
- Returns the name of this Conduit.
- Overrides:
toString
in class java.lang.Object
- Parameters:
the
- name of this Conduit.- See Also:
getConduitName()