SetConnectionProperty

Establishes the server connection configuration properties, such as host name and length of timeout.

Syntax

public void setConnectionProperty(String name, String value) 

Parameters

  • Name — the name of the connection property, such as HOST
  • Value — the value for the name of the connection property, such as "www.myhost.com"

Results

None.

Exceptions

  • ERROR-INVALID-COLUMN_NAME — an empty or null column name.
  • ERROR_INVALID_VALUE — A null value.

Example

Server server = new Server(); 

server.setConnectionProperty(Server.HOST, "localhost"); 
server.setConnectionProperty(Server.PORT, "8080"); 

//Connect to server 
server.connect();