public final class JNRPE extends Object
Constructor and Description |
---|
JNRPE(PluginRepository pluginRepository,
CommandRepository commandRepository)
Initializes the JNRPE worker.
|
Modifier and Type | Method and Description |
---|---|
void |
addAcceptedHost(String sAddress)
Adds an address to the list of accepted hosts.
|
void |
addEventListener(IJNRPEEventListener listener)
Adds a new event listener.
|
void |
listen(String sAddress,
int iPort)
Instructs the server to listen to the given IP/port.
|
void |
listen(String sAddress,
int iPort,
boolean bSSL)
Starts a new thread that listen for requests.
|
void |
shutdown()
Shuts down all the listener handled by this instance.
|
public JNRPE(PluginRepository pluginRepository, CommandRepository commandRepository)
pluginRepository
- The repository containing all the installed pluginscommandRepository
- The repository containing all the configured commands.public void listen(String sAddress, int iPort) throws UnknownHostException
sAddress
- The address to bind toiPort
- The port to bind toUnknownHostException
public void addEventListener(IJNRPEEventListener listener)
listener
- The event listener to be addedpublic void listen(String sAddress, int iPort, boolean bSSL) throws UnknownHostException
sAddress
- The address to bind toiPort
- The listening portbSSL
- true
if an SSL socket must be created.UnknownHostException
public void addAcceptedHost(String sAddress)
sAddress
- The address to acceptpublic void shutdown()
Copyright © 2013. All Rights Reserved.