Class NsclientClient
- java.lang.Object
-
- org.opennms.protocols.nsclient.detector.client.NsclientClient
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Client<NsclientRequest,NsclientPacket>
public class NsclientClient extends Object implements Client<NsclientRequest,NsclientPacket>
NsclientClient class.
- Version:
- $Id: $
- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description NsclientClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
closevoid
connect(InetAddress address, int port, int timeout)
connectString
getPassword()
NsclientPacket
receiveBanner()
receiveBannerNsclientPacket
sendRequest(NsclientRequest request)
sendRequestvoid
setPassword(String password)
-
-
-
Method Detail
-
connect
public void connect(InetAddress address, int port, int timeout) throws IOException, Exception
Description copied from interface:Client
connect
- Specified by:
connect
in interfaceClient<NsclientRequest,NsclientPacket>
- Parameters:
address
- aInetAddress
object.port
- a int.timeout
- a int.- Throws:
IOException
- if any.Exception
- if any.
-
close
public void close()
Description copied from interface:Client
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceClient<NsclientRequest,NsclientPacket>
- Specified by:
close
in interfaceCloseable
-
receiveBanner
public NsclientPacket receiveBanner() throws IOException, Exception
Description copied from interface:Client
receiveBanner
- Specified by:
receiveBanner
in interfaceClient<NsclientRequest,NsclientPacket>
- Returns:
- a Response object.
- Throws:
IOException
- if any.Exception
- if any.
-
sendRequest
public NsclientPacket sendRequest(NsclientRequest request) throws IOException, Exception
Description copied from interface:Client
sendRequest
- Specified by:
sendRequest
in interfaceClient<NsclientRequest,NsclientPacket>
- Parameters:
request
- a Request object.- Returns:
- a Response object.
- Throws:
IOException
- if any.Exception
- if any.
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
-