ami
Class AMIListener

java.lang.Object
  |
  +--ami.AMIListener
All Implemented Interfaces:
Runnable

class AMIListener
extends Object
implements Runnable

AMI Server side. Listens for incoming packets and transmits sockets to AMIReaders

Singleton

Version:
1.0
Author:
Bertrand Florat

Field Summary
private static AMIListener al
          Self instance used for signleton pattern
(package private)  boolean bStop
          boolean used to stop the thread
(package private) static ServerSocket ss
          The server socket
(package private)  Thread t
          Thread used for auto-start
(package private) static Vector vReader
          AMIReader vector
 
Constructor Summary
private AMIListener()
          Default constructor, thread auto-start
 
Method Summary
static AMIListener getInstance()
          Return a self instance Implementation of the singleton pattern
 void run()
          Run method
(package private)  void stop()
          Finalize the ami listener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

t

Thread t
Thread used for auto-start

vReader

static Vector vReader
AMIReader vector

ss

static ServerSocket ss
The server socket

bStop

volatile boolean bStop
boolean used to stop the thread

al

private static AMIListener al
Self instance used for signleton pattern
Constructor Detail

AMIListener

private AMIListener()
Default constructor, thread auto-start
Method Detail

getInstance

public static AMIListener getInstance()
Return a self instance

Implementation of the singleton pattern


run

public void run()
Run method
Specified by:
run in interface Runnable

stop

void stop()
Finalize the ami listener