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

Quick Search    Search Deep

plp.rs232
Class AbstractCommunicationDevice  view AbstractCommunicationDevice download AbstractCommunicationDevice.java

java.lang.Object
  extended byplp.rs232.AbstractCommunicationDevice
All Implemented Interfaces:
CommunicationDevice
Direct Known Subclasses:
CommunicationDeviceProxy, RS232, TestCommunicationDevice

abstract class AbstractCommunicationDevice
extends java.lang.Object
implements CommunicationDevice

This class implements the listener part of the CommunicationDevice


Field Summary
private  java.util.Vector listeners
           
 
Constructor Summary
(package private) AbstractCommunicationDevice()
           
 
Method Summary
 void addDataListener(DataListener listener)
          accessor method for DataListeners, implementation of CommunicationDevice
protected  void fireReceiveDataEvent(byte[] data)
          fires data event
protected  DataListener getListenerAt(int index)
          accessor method for DataListeners
private  java.util.Vector getListeners()
          accessor method for DataListeners
protected  int getNumberOfListeners()
          accessor method for DataListeners
 void removeDataListener(DataListener listener)
          accessor method for DataListeners, implementation of CommunicationDevice
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface plp.rs232.CommunicationDevice
close, sendData
 

Field Detail

listeners

private java.util.Vector listeners
Constructor Detail

AbstractCommunicationDevice

AbstractCommunicationDevice()
Method Detail

getListeners

private java.util.Vector getListeners()
accessor method for DataListeners


getNumberOfListeners

protected int getNumberOfListeners()
accessor method for DataListeners


getListenerAt

protected DataListener getListenerAt(int index)
accessor method for DataListeners


addDataListener

public void addDataListener(DataListener listener)
accessor method for DataListeners, implementation of CommunicationDevice

Specified by:
addDataListener in interface CommunicationDevice

removeDataListener

public void removeDataListener(DataListener listener)
accessor method for DataListeners, implementation of CommunicationDevice

Specified by:
removeDataListener in interface CommunicationDevice

fireReceiveDataEvent

protected void fireReceiveDataEvent(byte[] data)
fires data event