Package org.metricshub.ipmi.client
Class IpmiClientConfiguration
java.lang.Object
org.metricshub.ipmi.client.IpmiClientConfiguration
IPMI configuration including the required credentials that need to be used to establish the
communication with the IPMI interface.
-
Constructor Summary
ConstructorsConstructorDescriptionIpmiClientConfiguration
(String hostname, String username, char[] password, byte[] bmcKey, boolean skipAuth, long timeout) Instantiates a newIpmiClientConfiguration
in order to query the IPMI host.IpmiClientConfiguration
(String hostname, String username, char[] password, byte[] bmcKey, boolean skipAuth, long timeout, long pingPeriod) Instantiates a newIpmiClientConfiguration
in order to query the IPMI host. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the key that should be provided if the two-key authentication is enabled, null otherwise.Returns the IP Address or host name of the remote IPMI host.char[]
Returns the password used to establish the connection with the host via the IPMI protocol.long
Returns the period in milliseconds used to send the keep alive messages.long
Returns the timeout used for each IPMI request.Returns the name used to establish the connection with the host via the IPMI protocol.boolean
Returns whether the client should skip authentication.void
setBmcKey
(byte[] bmcKey) Sets the key that should be provided if the two-key authentication is enabled, null otherwise.void
setHostname
(String hostname) Sets the IP Address or host name of the remote IPMI host.void
setPassword
(char[] password) Sets the password used to establish the connection with the host via the IPMI protocol.void
setPingPeriod
(long pingPeriod) Sets the period in milliseconds used to send the keep alive messages.
Set pingPeriod to 0 to turn off keep-alive messages sent to the remote host.void
setSkipAuth
(boolean skipAuth) Sets whether the client should skip authentication.void
setTimeout
(long timeout) Sets the timeout used for each IPMI request.void
setUsername
(String username) Sets the name used to establish the connection with the host via the IPMI protocol.
-
Constructor Details
-
IpmiClientConfiguration
public IpmiClientConfiguration(String hostname, String username, char[] password, byte[] bmcKey, boolean skipAuth, long timeout) Instantiates a newIpmiClientConfiguration
in order to query the IPMI host.- Parameters:
hostname
- IP Address or host name of the remote IPMI host.username
- Name used to establish the connection with the host via the IPMI protocol.password
- Password used to establish the connection with the host via the IPMI protocol.bmcKey
- The key that should be provided if the two-key authentication is enabled, null otherwise.skipAuth
- Whether the client should skip authenticationtimeout
- Timeout used for each IPMI request.
-
IpmiClientConfiguration
public IpmiClientConfiguration(String hostname, String username, char[] password, byte[] bmcKey, boolean skipAuth, long timeout, long pingPeriod) Instantiates a newIpmiClientConfiguration
in order to query the IPMI host.- Parameters:
hostname
- IP Address or host name of the remote IPMI host.username
- Name used to establish the connection with the host via the IPMI protocol.password
- Password used to establish the connection with the host via the IPMI protocol.bmcKey
- The key that should be provided if the two-key authentication is enabled, null otherwise.skipAuth
- Whether the client should skip authenticationtimeout
- Timeout used for each IPMI request.pingPeriod
- The period in milliseconds used to send the keep alive messages.
Set pingPeriod to 0 to turn off keep-alive messages sent to the remote host.
-
-
Method Details
-
getHostname
Returns the IP Address or host name of the remote IPMI host.- Returns:
- IP Address or host name of the remote IPMI host.
-
setHostname
Sets the IP Address or host name of the remote IPMI host.- Parameters:
hostname
- IP Address or host name of the remote IPMI host.
-
getUsername
Returns the name used to establish the connection with the host via the IPMI protocol.- Returns:
- Name used to establish the connection with the host via the IPMI protocol.
-
setUsername
Sets the name used to establish the connection with the host via the IPMI protocol.- Parameters:
username
- Name used to establish the connection with the host via the IPMI protocol.
-
getPassword
public char[] getPassword()Returns the password used to establish the connection with the host via the IPMI protocol.- Returns:
- Password used to establish the connection with the host via the IPMI protocol.
-
setPassword
public void setPassword(char[] password) Sets the password used to establish the connection with the host via the IPMI protocol.- Parameters:
password
- Password used to establish the connection with the host via the IPMI protocol.
-
getBmcKey
public byte[] getBmcKey()Returns the key that should be provided if the two-key authentication is enabled, null otherwise.- Returns:
- The key that should be provided if the two-key authentication is enabled, null otherwise.
-
setBmcKey
public void setBmcKey(byte[] bmcKey) Sets the key that should be provided if the two-key authentication is enabled, null otherwise.- Parameters:
bmcKey
- The key that should be provided if the two-key authentication is enabled, null otherwise.
-
isSkipAuth
public boolean isSkipAuth()Returns whether the client should skip authentication.- Returns:
- Whether the client should skip authentication.
-
setSkipAuth
public void setSkipAuth(boolean skipAuth) Sets whether the client should skip authentication.- Parameters:
skipAuth
- Whether the client should skip authentication.
-
getTimeout
public long getTimeout()Returns the timeout used for each IPMI request.- Returns:
- The timeout used for each IPMI request.
-
setTimeout
public void setTimeout(long timeout) Sets the timeout used for each IPMI request.- Parameters:
timeout
- The timeout used for each IPMI request.
-
getPingPeriod
public long getPingPeriod()Returns the period in milliseconds used to send the keep alive messages.- Returns:
- The period in milliseconds used to send the keep alive messages.
-
setPingPeriod
public void setPingPeriod(long pingPeriod) Sets the period in milliseconds used to send the keep alive messages.
Set pingPeriod to 0 to turn off keep-alive messages sent to the remote host.- Parameters:
pingPeriod
- The period in milliseconds used to send the keep alive messages.
-