public class NagiosSettingsBuilder extends Object
NagiosSettings instance using a builder pattern
e.g.
NagiosSettings nagiosSettings = new NagiosSettingsBuilder()
.withNagiosHost(HOSTNAME)
.withPassword(PASSWORD)
.create();
| Constructor and Description |
|---|
NagiosSettingsBuilder() |
| Modifier and Type | Method and Description |
|---|---|
NagiosSettings |
create()
Return the built instance of
NagiosSettings |
NagiosSettings |
createDefault()
Return an instance of
NagiosSettings with default values |
NagiosSettingsBuilder |
withConnectionTimeout(int connectionTimeout)
The next
NagiosSettings created will use the supplied connection
timeout |
NagiosSettingsBuilder |
withEncryption(Encryption encryption)
The next
NagiosSettings created will use the specified
Encryption constant |
NagiosSettingsBuilder |
withEncryptor(Encryptor encryptor)
The next
NagiosSettings created will use the specified
Encryptor |
NagiosSettingsBuilder |
withLargeMessageSupportEnabled()
The next
NagiosSettings created will have large message support enabled,
see NagiosSettings.enableLargeMessageSupport(). |
NagiosSettingsBuilder |
withNagiosHost(String nagiosHost)
The next
NagiosSettings created will use the supplied nagiosHost |
NagiosSettingsBuilder |
withNoPassword()
The next
NagiosSettings created will have an empty string set as
the password |
NagiosSettingsBuilder |
withPassword(String password)
The next
NagiosSettings created will use the supplied password |
NagiosSettingsBuilder |
withPort(int port)
The next
NagiosSettings created will use the supplied port |
NagiosSettingsBuilder |
withResponseTimeout(int responseTimeout)
The next
NagiosSettings created will use the supplied response
timeout |
public NagiosSettings createDefault()
NagiosSettings with default valuespublic NagiosSettings create()
NagiosSettingspublic NagiosSettingsBuilder withNagiosHost(String nagiosHost)
NagiosSettings created will use the supplied nagiosHostnagiosHost - the NSCA hostname or IP addressNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withPort(int port)
NagiosSettings created will use the supplied portport - the port NSCA is listening onNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withNoPassword()
NagiosSettings created will have an empty string set as
the passwordNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withPassword(String password)
NagiosSettings created will use the supplied passwordpassword - the NSCA passwordNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withConnectionTimeout(int connectionTimeout)
NagiosSettings created will use the supplied connection
timeoutconnectionTimeout - the connection timeoutNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withResponseTimeout(int responseTimeout)
NagiosSettings created will use the supplied response
timeoutresponseTimeout - the NSCA response timeoutNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withEncryptor(Encryptor encryptor)
NagiosSettings created will use the specified
Encryptorencryptor - the encryptor to useNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withEncryption(Encryption encryption)
NagiosSettings created will use the specified
Encryption constantencryption - the Encryption to useNagiosSettingsBuilder instancepublic NagiosSettingsBuilder withLargeMessageSupportEnabled()
NagiosSettings created will have large message support enabled,
see NagiosSettings.enableLargeMessageSupport().NagiosSettingsBuilder instanceCopyright © Nov 2008–2021 JSend NSCA. All rights reserved.