Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

plp.rs232
Interface CommunicationDevice  view CommunicationDevice download CommunicationDevice.java

All Known Implementing Classes:
AbstractCommunicationDevice, CommunicationDeviceProxy, TestCommunicationDevice

public interface CommunicationDevice

A CommunicationDevice is a device that can send and receive data on byte level. The CommunicationDevice can be virtual, for testing purposes, or represent hardware, e.g. serial port or a infrared port.


Method Summary
 void addDataListener(DataListener listener)
          adds a DataListener object.
 void close()
          closes and releases the hardwareresources associated with this Device.
 void removeDataListener(DataListener listener)
          removes a DataListener object.
 void sendData(byte[] data)
          sends your data
 

Method Detail

addDataListener

public void addDataListener(DataListener listener)
adds a DataListener object. The DataListener will receive data from this CommunicationDevice


removeDataListener

public void removeDataListener(DataListener listener)
removes a DataListener object. This will prevent the listener from receiving data events.


sendData

public void sendData(byte[] data)
sends your data


close

public void close()
closes and releases the hardwareresources associated with this Device.