com.dalsemi.tininet.dhcp
Class DHCPClient

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.dalsemi.tininet.dhcp.DHCPClient

public class DHCPClient
extends java.lang.Thread

DHCPClient extends thread, call run to start dhcp process


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DHCPClient(DHCPListener DL)
          Constructor to start dhcp action to obtain a new IP DHCPClient passed listener so dhcp events can be reported
DHCPClient(DHCPListener DL, byte[] SIP, byte[] YIP)
          Init-Reboot Constructor to attempt to rebind to previous IP that was lost in a reboot
 
Method Summary
 void addDHCPListener(DHCPListener newListener)
           
 void removeDHCPListener(DHCPListener thisListener)
           
 void run()
          Run Method to start dhcp thread
 void stopDHCPThread()
          Method to stopDHCPThread, release ip, and close socket
 java.lang.String toString(int err)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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

DHCPClient

public DHCPClient(DHCPListener DL)
           throws java.lang.IllegalStateException
Constructor to start dhcp action to obtain a new IP DHCPClient passed listener so dhcp events can be reported
Parameters:
DL - - DHCPListener
See Also:

DHCPClient

public DHCPClient(DHCPListener DL,
                  byte[] SIP,
                  byte[] YIP)
           throws java.lang.IllegalStateException
Init-Reboot Constructor to attempt to rebind to previous IP that was lost in a reboot
Parameters:
DL - DHCPListener
SIP - IP of DHCP server where previous IP was obtained
YIP - IP to obtain
Method Detail

run

public void run()
Run Method to start dhcp thread
Overrides:
run in class java.lang.Thread

stopDHCPThread

public void stopDHCPThread()
Method to stopDHCPThread, release ip, and close socket

toString

public java.lang.String toString(int err)

addDHCPListener

public void addDHCPListener(DHCPListener newListener)

removeDHCPListener

public void removeDHCPListener(DHCPListener thisListener)