j_waste.network
Class ConnectionListener

java.lang.Object
  extended byjava.lang.Thread
      extended byj_waste.network.ConnectionListener
All Implemented Interfaces:
java.lang.Runnable

public class ConnectionListener
extends java.lang.Thread

This is the ConnectionListener class for creating and maintaing the local socket bound to this IP and port specified in preferences.

Version:
0.3
Author:
Jan Lindblom (cl0wn@users.sourceforge.net)

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConnectionListener(java.util.LinkedList connList, SynchronizedPrioQueue pq, java.util.ResourceBundle messages)
          Constructs a new ConnectionListener using values from the preferences set by the user.
 
Method Summary
 java.net.InetAddress getInetAddress()
          Returns the InetAddress of this ConnectionListener.
 int getPort()
          Returns the port of this ConnectionListener.
 void run()
           
 void setMessages(java.util.ResourceBundle m)
          Sets the ResourceBundle with messages for this ConnectionListener.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, 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
 

Constructor Detail

ConnectionListener

public ConnectionListener(java.util.LinkedList connList,
                          SynchronizedPrioQueue pq,
                          java.util.ResourceBundle messages)
Constructs a new ConnectionListener using values from the preferences set by the user.

Parameters:
connList - A LinkedList with Connection objects. New incoming connections will be added to this list.
pq - A synchronized priority queue.
messages - A resourceBundle for internationalization.
Method Detail

run

public void run()

getPort

public int getPort()
Returns the port of this ConnectionListener.

Returns:
the port number of this ConnectionListener.

getInetAddress

public java.net.InetAddress getInetAddress()
Returns the InetAddress of this ConnectionListener.

Returns:
the InetAddress of this ConnectionListener.

setMessages

public void setMessages(java.util.ResourceBundle m)
Sets the ResourceBundle with messages for this ConnectionListener.

Parameters:
m - the ResourceBundle with messages.