org.sapia.ubik.mcast.server
Class UDPServer

java.lang.Object
  extended by java.lang.Thread
      extended by org.sapia.ubik.mcast.server.UDPServer
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
UDPUnicastDispatcher

public abstract class UDPServer
extends java.lang.Thread

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.net.DatagramSocket _sock
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UDPServer(java.lang.String name, int soTimeout)
          Constructor for UDPServer.
UDPServer(java.lang.String name, int soTimeout, int port)
           
 
Method Summary
protected  int bufSize()
           
 int getPort()
           
protected abstract  void handle(java.net.DatagramPacket pack, java.net.DatagramSocket sock)
           
protected abstract  void handlePacketSizeToShort(java.net.DatagramPacket pack)
           
protected abstract  void handleSoTimeout()
           
 void run()
           
 void setBufsize(int size)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_sock

protected java.net.DatagramSocket _sock
Constructor Detail

UDPServer

public UDPServer(java.lang.String name,
                 int soTimeout)
          throws java.net.SocketException
Constructor for UDPServer.

Throws:
java.net.SocketException

UDPServer

public UDPServer(java.lang.String name,
                 int soTimeout,
                 int port)
          throws java.net.SocketException
Throws:
java.net.SocketException
Method Detail

setBufsize

public void setBufsize(int size)

getPort

public int getPort()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

bufSize

protected int bufSize()

handleSoTimeout

protected abstract void handleSoTimeout()

handlePacketSizeToShort

protected abstract void handlePacketSizeToShort(java.net.DatagramPacket pack)

handle

protected abstract void handle(java.net.DatagramPacket pack,
                               java.net.DatagramSocket sock)


Copyright © 2010 Sapia OSS. All Rights Reserved.