org.isam.exehda.services.dhc.server
Class ConfigServerImpl

java.lang.Object
  |
  +--org.isam.exehda.services.AbstractService
        |
        +--org.isam.exehda.services.HttpService
              |
              +--org.isam.exehda.services.dhc.server.ConfigServerImpl
All Implemented Interfaces:
ConfigServer, java.rmi.Remote, java.lang.Runnable, Service

public class ConfigServerImpl
extends HttpService
implements ConfigServer, Service


Nested Class Summary
 
Nested classes inherited from class org.isam.exehda.services.HttpService
HttpService.ServiceRequest, HttpService.ServiceResponse
 
Field Summary
(package private) static int DEFAULT_DHC_PORT
          defaults
(package private)  java.lang.String directory
           
(package private)  Logger log
           
(package private) static java.lang.String PROP_DHC_HOSTNAME
          properties
(package private) static java.lang.String PROP_DHC_IP
           
(package private) static java.lang.String PROP_DHC_MAC
           
(package private)  java.util.List rules
           
(package private)  UDPServer server
           
(package private)  java.util.Hashtable skeletons
           
 
Constructor Summary
ConfigServerImpl()
          Initializes server
 
Method Summary
 java.lang.String getConfiguration(java.lang.String hostName, java.lang.String ipAddr, java.lang.String mac)
          Get the correct configuration for the machine
protected  Skeleton getSkeleton(java.lang.String hostName, java.lang.String ipAddr, java.lang.String mac)
          Looks up the correct skeleton in the rules list
protected  void handleRequest(HttpService.ServiceRequest req)
          handle a request for a profile
 void start()
          Start the service
 void stop()
          stop the service
 
Methods inherited from class org.isam.exehda.services.HttpService
getPort, getThreadPoolSize, main, run, setPort, setThreadPoolSize
 
Methods inherited from class org.isam.exehda.services.AbstractService
log, log, log, log, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DHC_HOSTNAME

static final java.lang.String PROP_DHC_HOSTNAME
properties

See Also:
Constant Field Values

PROP_DHC_IP

static final java.lang.String PROP_DHC_IP
See Also:
Constant Field Values

PROP_DHC_MAC

static final java.lang.String PROP_DHC_MAC
See Also:
Constant Field Values

DEFAULT_DHC_PORT

static final int DEFAULT_DHC_PORT
defaults

See Also:
Constant Field Values

skeletons

java.util.Hashtable skeletons

rules

java.util.List rules

server

UDPServer server

directory

java.lang.String directory

log

Logger log
Constructor Detail

ConfigServerImpl

public ConfigServerImpl()
Initializes server

Method Detail

start

public void start()
Start the service

Specified by:
start in interface Service
Overrides:
start in class HttpService

stop

public void stop()
stop the service

Specified by:
stop in interface Service
Overrides:
stop in class HttpService

getSkeleton

protected Skeleton getSkeleton(java.lang.String hostName,
                               java.lang.String ipAddr,
                               java.lang.String mac)
Looks up the correct skeleton in the rules list


handleRequest

protected void handleRequest(HttpService.ServiceRequest req)
                      throws java.io.IOException
handle a request for a profile

Overrides:
handleRequest in class HttpService
java.io.IOException

getConfiguration

public java.lang.String getConfiguration(java.lang.String hostName,
                                         java.lang.String ipAddr,
                                         java.lang.String mac)
                                  throws java.rmi.RemoteException
Get the correct configuration for the machine

Specified by:
getConfiguration in interface ConfigServer
java.rmi.RemoteException