Class LoopClient
- java.lang.Object
-
- org.opennms.netmgt.provision.detector.loop.client.LoopClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Client<LineOrientedRequest,LoopResponse>
public class LoopClient extends java.lang.Object implements Client<LineOrientedRequest,LoopResponse>
LoopClient class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description LoopClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
closevoid
connect(java.net.InetAddress address, int port, int timeout)
connectboolean
isSupported()
isSupportedLoopResponse
receiveBanner()
receiveBannerLoopResponse
sendRequest(LineOrientedRequest request)
sendRequestvoid
setSupported(boolean isSupported)
setSupported
-
-
-
Method Detail
-
close
public void close()
close
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceClient<LineOrientedRequest,LoopResponse>
- Specified by:
close
in interfacejava.io.Closeable
-
connect
public void connect(java.net.InetAddress address, int port, int timeout) throws java.io.IOException, java.lang.Exception
connect
- Specified by:
connect
in interfaceClient<LineOrientedRequest,LoopResponse>
- Parameters:
address
- aInetAddress
object.port
- a int.timeout
- a int.- Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
receiveBanner
public LoopResponse receiveBanner() throws java.io.IOException, java.lang.Exception
receiveBanner
- Specified by:
receiveBanner
in interfaceClient<LineOrientedRequest,LoopResponse>
- Returns:
- a
LoopResponse
object. - Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
sendRequest
public LoopResponse sendRequest(LineOrientedRequest request) throws java.io.IOException, java.lang.Exception
sendRequest
- Specified by:
sendRequest
in interfaceClient<LineOrientedRequest,LoopResponse>
- Parameters:
request
- aLineOrientedRequest
object.- Returns:
- a
LoopResponse
object. - Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
setSupported
public void setSupported(boolean isSupported)
setSupported
- Parameters:
isSupported
- a boolean.
-
isSupported
public boolean isSupported()
isSupported
- Returns:
- a boolean.
-
-