amisample
Class ASListener

java.lang.Object
  |
  +--amisample.ASListener
All Implemented Interfaces:
Runnable

class ASListener
extends Object
implements Runnable

AMISample Server side. Listens for incoming messages

Singleton

Version:
1.0
Author:
Bertrand Florat

Field Summary
private static ASListener al
          Self instance used for signleton pattern
(package private) static 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
 
Constructor Summary
private ASListener()
          Default constructor, thread auto-start
 
Method Summary
static ASListener getInstance()
          Return a self instance Implementation of the singleton pattern
 void run()
          Run method
(package private) static 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

ss

static ServerSocket ss
The server socket

bStop

static volatile boolean bStop
boolean used to stop the thread

al

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

ASListener

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

getInstance

public static ASListener getInstance()
                              throws Exception
Return a self instance

Implementation of the singleton pattern


run

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

stop

static void stop()
Finalize the ami listener