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

Quick Search    Search Deep

org.jempeg.empeg.protocol
Class AbstractEmpegDiscoverer  view AbstractEmpegDiscoverer download AbstractEmpegDiscoverer.java

java.lang.Object
  extended byorg.jempeg.empeg.protocol.AbstractEmpegDiscoverer
Direct Known Subclasses:
CompoundEmpegDiscoverer, NetworkEmpegDiscoverer, SerialEmpegDiscoverer, UnicastNetworkEmpegDiscoverer, USBEmpegDiscoverer

public abstract class AbstractEmpegDiscoverer
extends java.lang.Object

AbstractEmpegDiscoverer is the base class for the various implementations of ways that an Empeg can be automatically located. Each implementation would provide a different type of connection on which the Empeg might be found.

Version:
$Revision: 1.7 $

Field Summary
private  org.jempeg.empeg.protocol.event.EmpegDiscovererListenerIfc myListener
           
 
Constructor Summary
AbstractEmpegDiscoverer()
           
 
Method Summary
 void addEmpegDiscovererListener(org.jempeg.empeg.protocol.event.EmpegDiscovererListenerIfc _listener)
          Adds an EmpegDiscovererListener to this instance.
abstract  boolean discover(int _timeoutMillis)
          Implemented by subclasses.
protected  void fireEmpegDiscovered(EmpegDescription _description, ConnectionIfc _conn)
          Fires the empegDiscovered event with the given description and connection.
protected  void fireEmpegDiscovered(org.jempeg.empeg.protocol.event.EmpegDiscovererEvent _event)
          Fires the EmpegDiscoered event
protected  java.lang.String getEmpegName(ConnectionIfc _conn)
          Retrieves the name of the Empeg using the given connection (this uses getPlayerConfiguration of the ProtocolClient.
protected  java.lang.String getPlayerType(ConnectionIfc _conn)
          Retrieves the type of the Empeg using the given connection.
protected  boolean isEmpegConnected(ConnectionIfc _conn)
          Returns whether or not an Empeg is connected on the given Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myListener

private org.jempeg.empeg.protocol.event.EmpegDiscovererListenerIfc myListener
Constructor Detail

AbstractEmpegDiscoverer

public AbstractEmpegDiscoverer()
Method Detail

addEmpegDiscovererListener

public void addEmpegDiscovererListener(org.jempeg.empeg.protocol.event.EmpegDiscovererListenerIfc _listener)
Adds an EmpegDiscovererListener to this instance. This listener will be notified if an Empeg is discovered.


discover

public abstract boolean discover(int _timeoutMillis)
                          throws java.io.IOException
Implemented by subclasses. This will actually perform the subclass-dependent mechanism of finding an Empeg (within the given timeout time)


fireEmpegDiscovered

protected void fireEmpegDiscovered(org.jempeg.empeg.protocol.event.EmpegDiscovererEvent _event)
Fires the EmpegDiscoered event


fireEmpegDiscovered

protected void fireEmpegDiscovered(EmpegDescription _description,
                                   ConnectionIfc _conn)
Fires the empegDiscovered event with the given description and connection.


getEmpegName

protected java.lang.String getEmpegName(ConnectionIfc _conn)
                                 throws java.io.IOException
Retrieves the name of the Empeg using the given connection (this uses getPlayerConfiguration of the ProtocolClient.


getPlayerType

protected java.lang.String getPlayerType(ConnectionIfc _conn)
                                  throws java.io.IOException
Retrieves the type of the Empeg using the given connection.


isEmpegConnected

protected boolean isEmpegConnected(ConnectionIfc _conn)
                            throws java.io.IOException
Returns whether or not an Empeg is connected on the given Connection.