org.palo.api
Class ConnectionConfiguration

java.lang.Object
  extended by org.palo.api.ConnectionConfiguration

public class ConnectionConfiguration
extends java.lang.Object

ConnectionConfiguration

A simple data class for holding connection concerned settings. A ConnectionConfiguration is only used to configure a connection to a palo server. After the connection is established it is no longer used.

Version:
$Id: ConnectionConfiguration.html,v 1.7 2009/07/09 11:01:46 ArndHouben Exp $

Constructor Summary
ConnectionConfiguration(java.lang.String host, java.lang.String service)
          Create a new ConnectionConfiguration instance with the specified host name and port number.
 
Method Summary
 boolean doLoadOnDemand()
          Returns true if load on demand is activated, false otherwise
 java.lang.String getHost()
          Returns the host which runs the palo server
 java.lang.String getPassword()
          Returns the login password in plaintext
 java.lang.String getPort()
          Deprecated. please use getService() instead
 java.lang.String getService()
          Returns the service as string representation which handles palo requests.
 int getTimeout()
          Returns the timeout setting in milliseconds after which a request is interrupted.
 int getType()
          Returns the connection type.
 java.lang.String getUser()
          Returns the login name
 void setLoadOnDemand(boolean loadOnDemand)
          En- or disables the load on demand behaviour.
 void setPassword(java.lang.String password)
          Sets the password in plaintext
 void setTimeout(int timeout)
          Specifies connection timeout in milliseconds after which a request is interrupted.
 void setType(int type)
          Specifies the connection type.
 void setUser(java.lang.String name)
          Sets the user login name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionConfiguration

public ConnectionConfiguration(java.lang.String host,
                               java.lang.String service)
Create a new ConnectionConfiguration instance with the specified host name and port number. The user name and password are not set. The type is Connection.TYPE_HTTP, load on demand is disabled and the timeout is Connection.DEFAULT_TIMEOUT

Parameters:
host -
port -
Method Detail

doLoadOnDemand

public final boolean doLoadOnDemand()
Returns true if load on demand is activated, false otherwise

Returns:
true if load on demand is used, false otherwise

getHost

public final java.lang.String getHost()
Returns the host which runs the palo server

Returns:
host name or ip address

getPassword

public final java.lang.String getPassword()
Returns the login password in plaintext

Returns:
login password

getPort

public final java.lang.String getPort()
Deprecated. please use getService() instead

Returns the port number at which the palo server is listening for requests

Returns:
port number of palo server

getService

public final java.lang.String getService()
Returns the service as string representation which handles palo requests.

Returns:
the service for handling palo requests

getTimeout

public final int getTimeout()
Returns the timeout setting in milliseconds after which a request is interrupted.

Returns:
request timeout in milliseconds

getType

public final int getType()
Returns the connection type. Currently only Connection.TYPE_HTTP, Connection.TYPE_XMLA and Connection.TYPE_LEGACY are supported

Returns:
connection type constant

getUser

public final java.lang.String getUser()
Returns the login name

Returns:
login name

setLoadOnDemand

public final void setLoadOnDemand(boolean loadOnDemand)
En- or disables the load on demand behaviour. Usually load on demand leads to more faster behaviour of the connection, but the requesting client should act appropriately to get this benefit. Specify true to activate load on demand behaviour for this connection, specify false to deactivate it.

Parameters:
loadOnDemand - specify true to activate it, false otherwise

setPassword

public final void setPassword(java.lang.String password)
Sets the password in plaintext

Parameters:
password - login password

setTimeout

public final void setTimeout(int timeout)
Specifies connection timeout in milliseconds after which a request is interrupted. Note that the timeout must be > 0 and a timeout of zero is interpreted as an infinite timeout

Parameters:
timeout - the timeout in milliseconds

setType

public final void setType(int type)
Specifies the connection type. Currently only Connection.TYPE_HTTP, Connection.TYPE_XMLA and Connection.TYPE_LEGACY are supported

Parameters:
type - connection type

setUser

public final void setUser(java.lang.String name)
Sets the user login name.

Parameters:
name - login name