Class JDBCClient
- java.lang.Object
-
- org.opennms.netmgt.provision.detector.jdbc.client.JDBCClient
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Client<JDBCRequest,JDBCResponse>
public class JDBCClient extends Object implements Client<JDBCRequest,JDBCResponse>
JDBCClient class.
- Version:
- $Id: $
- Author:
- thedesloge
-
-
Constructor Summary
Constructors Constructor Description JDBCClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
closevoid
connect(InetAddress address, int port, int timeout)
connectString
getDbDriver()
getDbDriverString
getPassword()
getPasswordString
getUrl()
getUrlString
getUser()
getUserJDBCResponse
receiveBanner()
receiveBannerJDBCResponse
sendRequest(JDBCRequest request)
sendRequestvoid
setDbDriver(String dbDriver)
setDbDrivervoid
setPassword(String password)
setPasswordvoid
setUrl(String url)
setUrlvoid
setUser(String user)
setUser
-
-
-
Method Detail
-
close
public void close()
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceClient<JDBCRequest,JDBCResponse>
- Specified by:
close
in interfaceCloseable
-
connect
public void connect(InetAddress address, int port, int timeout) throws IOException, Exception
connect
- Specified by:
connect
in interfaceClient<JDBCRequest,JDBCResponse>
- Parameters:
address
- aInetAddress
object.port
- a int.timeout
- a int.- Throws:
IOException
- if any.Exception
- if any.
-
receiveBanner
public JDBCResponse receiveBanner() throws IOException, Exception
receiveBanner
- Specified by:
receiveBanner
in interfaceClient<JDBCRequest,JDBCResponse>
- Returns:
- a
JDBCResponse
object. - Throws:
IOException
- if any.Exception
- if any.
-
sendRequest
public JDBCResponse sendRequest(JDBCRequest request) throws IOException, Exception
sendRequest
- Specified by:
sendRequest
in interfaceClient<JDBCRequest,JDBCResponse>
- Parameters:
request
- aJDBCRequest
object.- Returns:
- a
JDBCResponse
object. - Throws:
IOException
- if any.Exception
- if any.
-
setDbDriver
public void setDbDriver(String dbDriver)
setDbDriver
- Parameters:
dbDriver
- aString
object.
-
setPassword
public void setPassword(String password)
setPassword
- Parameters:
password
- aString
object.
-
-