uk.org.iscream.cms.server.filter
Class UDPReader

java.lang.Object
  extended byjava.lang.Thread
      extended byuk.org.iscream.cms.server.filter.UDPReader
All Implemented Interfaces:
Runnable

public class UDPReader
extends Thread

This class contains the main method to be run by the filterd. It harvests UDP traffic, and queues it.

Version:
$Id: UDPReader.java,v 1.25 2003/02/05 16:43:47 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  Logger _logger
          This holds a reference to the system logger that is being used.
private  String _name
          This is the friendly identifier of the component this class is running in.
(package private)  int _port
          The port that this reader is using
(package private)  Queue _queue
          The Queue object
private  int packetSizeLimit
          The maximum size of a packet
 String REVISION
          The current CVS revision of this class
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UDPReader(int port, Queue queue)
          Constructs a new UDPReader.
 
Method Summary
 void run()
          The main method in the class.
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
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, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

packetSizeLimit

private final int packetSizeLimit
The maximum size of a packet

See Also:
Constant Field Values

_name

private String _name
This is the friendly identifier of the component this class is running in. eg, a Filter may be called "filter1", If this class does not have an owning component, a name from the configuration can be placed here. This name could also be changed to null for utility classes.


_logger

private Logger _logger
This holds a reference to the system logger that is being used.


_port

int _port
The port that this reader is using


_queue

Queue _queue
The Queue object

Constructor Detail

UDPReader

public UDPReader(int port,
                 Queue queue)
Constructs a new UDPReader.

Parameters:
port - The port on which we listen for UDP data
queue - The queue which we are using
Method Detail

run

public void run()
The main method in the class. Reads and queues XML sent over UDP.


toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.org.iscream.cms.util.NameFormat class to format the toString()

Returns:
the name of this class and its CVS revision


Copyright © 2000-2003 i-scream. All Rights Reserved.