org.lirc
Class ReceiverFactory

java.lang.Object
  |
  +--org.lirc.ReceiverFactory

public class ReceiverFactory
extends java.lang.Object

Reads signals from the lircd socket. The actual work is done by a platform-specific Receiver. Most applications wouldn't use this class directly, use LIRCClient instead. Usage:

Receiver rec = ReceiverFactory.createReceiver();

while (keepListening){
String code = rec.readCode();
// do something with the code
}

rec.close();

Version:
$Revision: 1.4 $
Author:
Bjorn Bringert (bjorn@mumblebee.com)
See Also:
Receiver

Constructor Summary
ReceiverFactory()
           
 
Method Summary
static Receiver createReceiver()
          Gets an appropriate receiver for this platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceiverFactory

public ReceiverFactory()
Method Detail

createReceiver

public static Receiver createReceiver()
                               throws LIRCException
Gets an appropriate receiver for this platform. If the system property org.lirc.ReceiverFactory.receiver is set its value is treated as a fully qualified class name and the receiver is created from that class. Otherwise the default receiver for the platform is loaded.
Throws:
LIRCException - if there is a problem loading the receiver class or connecting to the lircd daemon