public class ScriptedUserAdder extends Object implements UserAdder
${user}
and ${password}
.Constructor and Description |
---|
ScriptedUserAdder(String host,
int port)
Constructs an adder without a script.
|
ScriptedUserAdder(String host,
int port,
Monitor monitor)
Note that
addUser(String, String) will not be available |
ScriptedUserAdder(String host,
int port,
String script) |
ScriptedUserAdder(String host,
int port,
String script,
Monitor monitor) |
Modifier and Type | Method and Description |
---|---|
void |
addUser(String user,
String password)
Adds a user using the script read from the given input.
|
void |
addUser(String user,
String password,
Reader reader)
Adds a user using the script read from the given input.
|
String |
toString()
Constructs a
String with all attributes
in name = value format. |
public ScriptedUserAdder(String host, int port)
addUser(String, String)
will not be availablehost
- connect to this hostport
- connect to this portpublic ScriptedUserAdder(String host, int port, String script)
public ScriptedUserAdder(String host, int port, Monitor monitor)
addUser(String, String)
will not be availablehost
- connect to this hostport
- connect to this portmonitor
- not nullpublic ScriptedUserAdder(String host, int port, String script, Monitor monitor)
public void addUser(String user, String password) throws Exception
addUser
in interface UserAdder
user
- user name, not nullpassword
- password to set, not nullException
- upon failureNullPointerException
- when script has not been setpublic void addUser(String user, String password, Reader reader) throws Exception
user
- user name, not nullpassword
- password to set, not nullreader
- reader for script, not nullException
- upon failureCopyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.