context.arch.generator
Class TestIButton

java.lang.Object
  |
  +--context.arch.generator.TestIButton

public class TestIButton
extends java.lang.Object
implements com.ibutton.oc.JibMultiListener

This class is sample code to test the Java iButton reader. Whenever an iButton docks with the reader, the iButton id is written to standard out.

See Also:
JibMultiListener

Constructor Summary
TestIButton()
          Constructor that allows this object to handle iButton events and starts listening to the iButton reader.
 
Method Summary
 void iButtonInserted(com.ibutton.oc.JibMultiEvent event)
          This method is called by the card terminal driver to let us know that a Button insertion has been detected.
 void iButtonRemoved(com.ibutton.oc.JibMultiEvent event)
          This method is called by the card terminal driver to let us know that a Button removal has been detected.
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestIButton

public TestIButton()
Constructor that allows this object to handle iButton events and starts listening to the iButton reader.
See Also:
JibMultiFactory, com.ibutton.oc.JibMultiFactory#addJiBListener(com.ibutton.oc.terminal.jib.JibMultiListener), JibMultiFactory.startPolling(boolean)
Method Detail

iButtonInserted

public void iButtonInserted(com.ibutton.oc.JibMultiEvent event)
This method is called by the card terminal driver to let us know that a Button insertion has been detected. It stores the information locally and notifies the registered Widget object, if available, of the new data.
Specified by:
iButtonInserted in interface com.ibutton.oc.JibMultiListener
Parameters:
event - Event that indicates an iButton has been inserted
See Also:
Widget.notify(java.lang.String,java.lang.Object), com.ibutton.oc.terminal.jib.JibMultiEvent

iButtonRemoved

public void iButtonRemoved(com.ibutton.oc.JibMultiEvent event)
This method is called by the card terminal driver to let us know that a Button removal has been detected. It just prints a message to the screen.
Specified by:
iButtonRemoved in interface com.ibutton.oc.JibMultiListener
Parameters:
event - Event that indicates an iButton has been removed
See Also:
com.ibutton.oc.terminal.jib.JibMultiEvent

main

public static void main(java.lang.String[] argv)