it.jnrpe
Class JNRPEBuilder

java.lang.Object
  extended by it.jnrpe.JNRPEBuilder

public final class JNRPEBuilder
extends Object

Builder for the JNRPE object.

Author:
Massimiliano Ziccardi

Method Summary
 JNRPEBuilder acceptHost(String hostName)
          Adds a client host to the list of accepted hosts.
 JNRPEBuilder acceptParams(boolean accept)
          Pass true if $ARGxx$ macros should be expanded.
 JNRPE build()
          Builds the configured JNRPE instance.
static JNRPEBuilder forRepositories(IPluginRepository pluginRepository, CommandRepository commandRepository)
          Entry point for the builder.
 JNRPEBuilder withCharset(Charset newCharset)
          Sets the charset to be used.
 JNRPEBuilder withListener(IJNRPEEventListener listener)
          Adds a listener to the list of event listener.
 JNRPEBuilder withMaxAcceptedConnections(int maxConnections)
          Sets the maximum number of accepted connections.
 JNRPEBuilder withReadTimeout(int readTimeoutSecs)
          Sets the read timeout in seconds.
 JNRPEBuilder withWriteTimeout(int writeTimeoutSecs)
          Sets the write timeout in seconds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forRepositories

public static JNRPEBuilder forRepositories(IPluginRepository pluginRepository,
                                           CommandRepository commandRepository)
Entry point for the builder.

Parameters:
pluginRepository - The plugin repository
commandRepository - The command repository
Returns:
this

acceptParams

public JNRPEBuilder acceptParams(boolean accept)
Pass true if $ARGxx$ macros should be expanded.

Parameters:
accept - true if $ARGxx$ macros should be expanded.
Returns:
this

acceptHost

public JNRPEBuilder acceptHost(String hostName)
Adds a client host to the list of accepted hosts.

Parameters:
hostName - the hostname or ip address
Returns:
this

withListener

public JNRPEBuilder withListener(IJNRPEEventListener listener)
Adds a listener to the list of event listener.

Parameters:
listener - the listener
Returns:
this

withCharset

public JNRPEBuilder withCharset(Charset newCharset)
Sets the charset to be used.

Parameters:
newCharset - the charset to be used
Returns:
this

withMaxAcceptedConnections

public JNRPEBuilder withMaxAcceptedConnections(int maxConnections)
Sets the maximum number of accepted connections.

Parameters:
maxConnections - the maximum number of accepted connections.
Returns:
this

withReadTimeout

public JNRPEBuilder withReadTimeout(int readTimeoutSecs)
Sets the read timeout in seconds. Default is DEFAULT_READ_TIMEOUT seconds.

Parameters:
readTimeoutSecs - the new read timeout in seconds
Returns:
this

withWriteTimeout

public JNRPEBuilder withWriteTimeout(int writeTimeoutSecs)
Sets the write timeout in seconds. Default is DEFAULT_WRITE_TIMEOUT seconds.

Parameters:
writeTimeoutSecs - the new write timeout in seconds
Returns:
this

build

public JNRPE build()
Builds the configured JNRPE instance.

Returns:
the configured JNRPE instance


Copyright © 2014. All Rights Reserved.