org.opennms.netmgt.dhcpd
Class Client
java.lang.Object
java.util.Observable
org.opennms.netmgt.dhcpd.Client
- All Implemented Interfaces:
- Fiber, java.lang.Runnable
- final class Client
- extends java.util.Observable
- implements java.lang.Runnable, Fiber
Nested Class Summary |
class |
Client.UnicastListener
The remote DHCP server we sent the request to has the option of either
unicasting the response directly back to us or broadcasting the response
to port 68 on the local subnet. |
Fields inherited from class java.util.Observable |
|
Constructor Summary |
(package private) |
Client(java.net.Socket clnt)
|
Method Summary |
java.lang.String |
getName()
This method is used to return the name of the Fiber . |
int |
getStatus()
This method is used to get the current status of the Fiber . |
void |
run()
|
(package private) void |
sendMessage(Message msg)
|
void |
start()
This method is used to start the initilization process of the
Fiber , which should eventually transition to a
RUNNING status. |
void |
stop()
This method is used to stop a currently running Fiber . |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DHCP_TARGET_PORT
private static final short DHCP_TARGET_PORT
- See Also:
- Constant Field Values
NULL_ADDR
private static java.net.InetAddress NULL_ADDR
m_sender
private java.net.DatagramSocket m_sender
m_client
private java.net.Socket m_client
m_objsOut
private java.io.ObjectOutputStream m_objsOut
m_name
private java.lang.String m_name
m_status
private int m_status
m_worker
private java.lang.Thread m_worker
m_unicastListener
private Client.UnicastListener m_unicastListener
m_keepListening
private boolean m_keepListening
Client
Client(java.net.Socket clnt)
throws java.io.IOException
sendMessage
void sendMessage(Message msg)
throws java.io.IOException
- Throws:
java.io.IOException
start
public void start()
- Description copied from interface:
Fiber
- This method is used to start the initilization process of the
Fiber
, which should eventually transition to a
RUNNING
status.
- Specified by:
start
in interface Fiber
stop
public void stop()
- Description copied from interface:
Fiber
- This method is used to stop a currently running
Fiber
.
Once invoked the Fiber
should begin it's shutdown process.
Depending on the implementation, this method may block until the
Fiber
terminates.
- Specified by:
stop
in interface Fiber
getStatus
public int getStatus()
- Description copied from interface:
Fiber
- This method is used to get the current status of the
Fiber
.
The status of the fiber should be one of the predefined constants of the
Fiber
interface, or from one of the derived interfaces.
- Specified by:
getStatus
in interface Fiber
- Returns:
- The current status of the
Fiber
.
getName
public java.lang.String getName()
- Description copied from interface:
Fiber
- This method is used to return the name of the
Fiber
. The
name of the instance is defined by the implementor, but it should be
realitively unique when possible.
- Specified by:
getName
in interface Fiber
- Returns:
- The name of the
Fiber
.
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
Generated by eevans on May 29 2005 2015.