org.opennms.netmgt.provision.detector.simple.client
Class NrpeClient

java.lang.Object
  extended by org.opennms.netmgt.provision.detector.simple.client.NrpeClient
All Implemented Interfaces:
Client<NrpeRequest,NrpePacket>

public class NrpeClient
extends Object
implements Client<NrpeRequest,NrpePacket>

Author:
Donald Desloge

Constructor Summary
NrpeClient()
           
 
Method Summary
 void close()
           
 void connect(InetAddress address, int port, int timeout)
           
 InputStream getInput()
           
 OutputStream getOutput()
           
 int getPadding()
           
protected  Socket getWrappedSocket(InetAddress address, int port, int timeout)
           
 boolean isUseSsl()
           
 NrpePacket receiveBanner()
           
 NrpePacket sendRequest(NrpeRequest request)
           
 void setInput(InputStream in)
           
 void setOutput(OutputStream out)
           
 void setPadding(int padding)
           
 void setUseSsl(boolean useSsl)
           
protected  Socket wrapSocket(Socket socket, String hostAddress, int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NrpeClient

public NrpeClient()
Method Detail

close

public void close()
Specified by:
close in interface Client<NrpeRequest,NrpePacket>

connect

public void connect(InetAddress address,
                    int port,
                    int timeout)
             throws IOException,
                    Exception
Specified by:
connect in interface Client<NrpeRequest,NrpePacket>
Throws:
IOException
Exception

getWrappedSocket

protected Socket getWrappedSocket(InetAddress address,
                                  int port,
                                  int timeout)
                           throws IOException
Throws:
IOException

wrapSocket

protected Socket wrapSocket(Socket socket,
                            String hostAddress,
                            int port)
                     throws Exception
Throws:
Exception

receiveBanner

public NrpePacket receiveBanner()
                         throws IOException,
                                Exception
Specified by:
receiveBanner in interface Client<NrpeRequest,NrpePacket>
Throws:
IOException
Exception

sendRequest

public NrpePacket sendRequest(NrpeRequest request)
                       throws IOException,
                              Exception
Specified by:
sendRequest in interface Client<NrpeRequest,NrpePacket>
Throws:
IOException
Exception

setPadding

public void setPadding(int padding)

getPadding

public int getPadding()

setUseSsl

public void setUseSsl(boolean useSsl)

isUseSsl

public boolean isUseSsl()

setOutput

public void setOutput(OutputStream out)

getOutput

public OutputStream getOutput()

setInput

public void setInput(InputStream in)

getInput

public InputStream getInput()


Copyright © 2009. All Rights Reserved.