org.opennms.netmgt.provision.detector.dhcp.client
Class DhcpClient

java.lang.Object
  extended by org.opennms.netmgt.provision.detector.dhcp.client.DhcpClient
All Implemented Interfaces:
Client<DhcpRequest,DhcpResponse>

public class DhcpClient
extends Object
implements Client<DhcpRequest,DhcpResponse>

DhcpClient class.

Version:
$Id: $
Author:
ranger

Constructor Summary
DhcpClient()
           
 
Method Summary
 void close()
          close
 void connect(InetAddress address, int port, int timeout)
          connect
 int getRetries()
          getRetries
 DhcpResponse receiveBanner()
          receiveBanner
 DhcpResponse sendRequest(DhcpRequest request)
          sendRequest
 void setRetries(int retries)
          setRetries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DhcpClient

public DhcpClient()
Method Detail

close

public void close()

close

Specified by:
close in interface Client<DhcpRequest,DhcpResponse>

connect

public void connect(InetAddress address,
                    int port,
                    int timeout)
             throws IOException,
                    Exception

connect

Specified by:
connect in interface Client<DhcpRequest,DhcpResponse>
Parameters:
address - a InetAddress object.
port - a int.
timeout - a int.
Throws:
IOException - if any.
Exception - if any.

receiveBanner

public DhcpResponse receiveBanner()
                           throws IOException,
                                  Exception

receiveBanner

Specified by:
receiveBanner in interface Client<DhcpRequest,DhcpResponse>
Returns:
a DhcpResponse object.
Throws:
IOException - if any.
Exception - if any.

sendRequest

public DhcpResponse sendRequest(DhcpRequest request)
                         throws IOException,
                                Exception

sendRequest

Specified by:
sendRequest in interface Client<DhcpRequest,DhcpResponse>
Parameters:
request - a DhcpRequest object.
Returns:
a DhcpResponse object.
Throws:
IOException - if any.
Exception - if any.

setRetries

public void setRetries(int retries)

setRetries

Parameters:
retries - a int.

getRetries

public int getRetries()

getRetries

Returns:
a int.


Copyright © 2011. All Rights Reserved.