The username and password for connections may be stored in the AO Serv Client properties file named /com/aoindustries/aoserv/client/aoserv-client.properties
. The default properties look like the following:
aoserv.client.username=
aoserv.client.password=
# List of supported protocols
aoserv.client.protocols=tcp
# Socket specific parameters
aoserv.client.tcp.hostname=master.aoindustries.com
aoserv.client.tcp.port=4582
aoserv.client.tcp.connection.pool.size=8
By placing this resource in your CLASSPATH
before aoserv-client.jar
, you can override the default settings. Adding the username and password for your connection will avoid login prompts for the aosh
and allow you to use the AOServConnector.getConnector()
call to establish connections.
aoserv.client.username=my_username
aoserv.client.password=my_strong_password
# List of supported protocols
aoserv.client.protocols=tcp
# Socket specific parameters
aoserv.client.tcp.hostname=master.aoindustries.com
aoserv.client.tcp.port=4582
aoserv.client.tcp.connection.pool.size=8