|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Transport.SLPTransportInterface | +--org.jSyncManager.API.Transport.USBTransportInterface | +--org.jSyncManager.Transport.JUSBTransport
JUSBTransport.java USB Transport Class. This class provides a bridge between the Java USB API and the SLP Protocol class. For information on the jUSB API or to download it or its sources, please see: http://jusb.sourceforge.net
Fields inherited from class org.jSyncManager.API.Transport.USBTransportInterface |
---|
CLIE_VENDOR_ID, HANDSPRING_VENDOR_ID, PALM_VENDOR_ID |
Fields inherited from class org.jSyncManager.API.Transport.SLPTransportInterface |
---|
configPanel, connected |
Constructor Summary | |
---|---|
JUSBTransport()
Creates a new instance of JUSBTransport |
Method Summary | |
---|---|
void |
busAdded(usb.core.Bus bus)
Called when a new USB bus is added to the system. |
void |
busRemoved(usb.core.Bus bus)
Called when a bus is removed from the system. |
boolean |
checkPDAType(usb.core.Device dev1)
Checks to see wether or not the newly attached device is a recognised PDA. |
void |
close()
Closes the implemented transport. |
protected javax.swing.JPanel |
constructConfigPanel()
Constructs this transports configuration panel. |
void |
deviceAdded(usb.core.Device dev)
New device added. |
void |
deviceRemoved(usb.core.Device dev)
Device removed. |
void |
finalize()
Completed on garbage removal of the implemented transport. |
void |
flush()
Flushes the input buffer of any remaining data. |
java.lang.String |
getResourceBundleName()
Returns the fully-qualified classname for the resources package to use for this transport. |
java.lang.String |
getTransportDescription()
Returns the description for this Transport Interface. |
java.lang.String |
getTransportExceptionText(TransportException ex)
Retrieves error information for a given TransportInitException. |
java.lang.String |
getTransportName()
Returns the name of this Transport Interface. |
void |
initialize()
Initialize the port. |
void |
initialize(java.util.Properties properties,
int id)
Initialize the port. |
void |
open()
Opens a read/write connection to the implemented transport. |
byte |
readByte()
Read a single byte from the underlying data stream. |
void |
writeBytes(byte[] data)
Write an array of bytes to the underlying data stream. |
Methods inherited from class org.jSyncManager.API.Transport.SLPTransportInterface |
---|
getConfigPanel, getResourceBundle, isConnected, loadResourceBundle, setConnected |
Methods inherited from class java.lang.Object |
---|
|
Constructor Detail |
public JUSBTransport() throws TransportException
Method Detail |
public java.lang.String getResourceBundleName()
getResourceBundleName
in class SLPTransportInterface
public java.lang.String getTransportExceptionText(TransportException ex)
getTransportExceptionText
in class SLPTransportInterface
ex
- the TransportInitException to be inspected.public java.lang.String getTransportName()
getTransportName
in class SLPTransportInterface
public void initialize() throws TransportException
initialize
in class SLPTransportInterface
TransportException
- thrown if there isn't sufficient info to setup the transport,
or if another exception has occurred.public boolean checkPDAType(usb.core.Device dev1)
public void initialize(java.util.Properties properties, int id) throws TransportException
initialize
in class SLPTransportInterface
properties
- a reference to the properties file containing configuration information.id
- the transport ID number to load data for.TransportException
- if there is a problem initializing the transport.public void open() throws TransportException
open
in class SLPTransportInterface
TransportException
- any exception the underlying code may throw.public void finalize() throws TransportException
finalize
in class java.lang.Object
TransportException
- throws any required exception.public void close() throws TransportException
close
in class SLPTransportInterface
TransportException
- throws any required exception.public void flush() throws TransportException
flush
in class SLPTransportInterface
thrown
- when a problem occurs with flushing the stream.public byte readByte()
readByte
in class SLPTransportInterface
public void writeBytes(byte[] data)
writeBytes
in class SLPTransportInterface
data
- the bytes to be written to the underlying stream.public void busAdded(usb.core.Bus bus) throws java.io.IOException
busAdded
in interface usb.core.USBListener
java.io.IOException
- thrown if there is an IO error of any sort.public void busRemoved(usb.core.Bus bus) throws java.io.IOException
busRemoved
in interface usb.core.USBListener
java.io.IOException
- thrown if there is an IO error of any sort.public void deviceAdded(usb.core.Device dev)
deviceAdded
in interface usb.core.USBListener
dev
- the Device descriptor for the USB device that was added to the bus.public void deviceRemoved(usb.core.Device dev) throws java.io.IOException
deviceRemoved
in interface usb.core.USBListener
dev
- the Device descriptor for the USB device that was removed from the bus.protected javax.swing.JPanel constructConfigPanel()
constructConfigPanel
in class SLPTransportInterface
public java.lang.String getTransportDescription()
getTransportDescription
in class SLPTransportInterface
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |