MicroTAPAS.mobility
Class MicroPingServer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--MicroTAPAS.mobility.MicroPingServer
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class MicroPingServer
extends java.lang.Thread
implements java.io.Serializable

This class simply accepts ping requests

See Also:
Serialized Form

Field Summary
private  java.net.Socket clientSocket
           
private  boolean isActive
           
private  int pingPort
           
private  java.net.ServerSocket server
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MicroPingServer()
          Empty constructor
 
Method Summary
 void destroy()
          Destroy method
 void run()
          Required run method
 void socketListen()
          Main functionality of thread.
 Item status()
          Status report of MicroPingServer in Item hierarchy of information elements.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isActive

private boolean isActive

pingPort

private int pingPort

server

private java.net.ServerSocket server

clientSocket

private java.net.Socket clientSocket
Constructor Detail

MicroPingServer

public MicroPingServer()
Empty constructor

Method Detail

run

public void run()
Required run method

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

destroy

public void destroy()
Destroy method

Overrides:
destroy in class java.lang.Thread

socketListen

public void socketListen()
                  throws java.lang.Exception
Main functionality of thread. Accepts incomming connections and closes the connection immdiateley. Then the calling party knows there is a connection between the two. Otherwise, a java.net.ConnectException: Connection refused: connect had been thrown.

java.lang.Exception

status

public Item status()
Status report of MicroPingServer in Item hierarchy of information elements.

Returns:
Hierarchy of Item information elements


The Telematics Architecture for Plug-and-Play Systems (TAPAS) is a research project undertaken by the Norwegian University of Science and Technology's Telematics department which aims at developing an architecture for network-based service systems with a) flexibility and adaptability, b) robustness and survivability, and c) QoS awareness and resource control.

More information can be found at the project's homepage at http://tapas.item.ntnu.no and the project manager, Professor Finn Arve Aagesen, can be reached at finn.arve.aagesen@item.ntnu.no.