Class TrivialTimeClient
- java.lang.Object
-
- org.opennms.netmgt.provision.detector.simple.client.TrivialTimeClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Client<TrivialTimeRequest,TrivialTimeResponse>
public class TrivialTimeClient extends java.lang.Object implements Client<TrivialTimeRequest,TrivialTimeResponse>
-
-
Constructor Summary
Constructors Constructor Description TrivialTimeClient(java.lang.String protocol, int allowedSkew)
-
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)
connectTrivialTimeResponse
receiveBanner()
receiveBannerTrivialTimeResponse
sendRequest(TrivialTimeRequest request)
sendRequestvoid
setRetries(int retries)
-
-
-
Method Detail
-
connect
public void connect(java.net.InetAddress address, int port, int timeout) throws java.io.IOException, java.lang.Exception
Description copied from interface:Client
connect
- Specified by:
connect
in interfaceClient<TrivialTimeRequest,TrivialTimeResponse>
- Parameters:
address
- aInetAddress
object.port
- a int.timeout
- a int.- Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
close
public void close()
Description copied from interface:Client
close
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceClient<TrivialTimeRequest,TrivialTimeResponse>
- Specified by:
close
in interfacejava.io.Closeable
-
receiveBanner
public TrivialTimeResponse receiveBanner() throws java.io.IOException, java.lang.Exception
Description copied from interface:Client
receiveBanner
- Specified by:
receiveBanner
in interfaceClient<TrivialTimeRequest,TrivialTimeResponse>
- Returns:
- a Response object.
- Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
sendRequest
public TrivialTimeResponse sendRequest(TrivialTimeRequest request) throws java.io.IOException, java.lang.Exception
Description copied from interface:Client
sendRequest
- Specified by:
sendRequest
in interfaceClient<TrivialTimeRequest,TrivialTimeResponse>
- Parameters:
request
- a Request object.- Returns:
- a Response object.
- Throws:
java.io.IOException
- if any.java.lang.Exception
- if any.
-
setRetries
public void setRetries(int retries)
-
-