org.palo.api.impl
Class ConnectionFactoryImpl

java.lang.Object
  extended by org.palo.api.ConnectionFactory
      extended by org.palo.api.impl.ConnectionFactoryImpl

public class ConnectionFactoryImpl
extends ConnectionFactory

ConnectionFactoryImpl

Version:
$Id$

Constructor Summary
ConnectionFactoryImpl()
           
 
Method Summary
 ConnectionConfiguration getConfiguration(java.lang.String host, java.lang.String service)
          Returns a default ConnectionConfiguration instance.
 ConnectionConfiguration getConfiguration(java.lang.String host, java.lang.String service, java.lang.String user, java.lang.String password)
          Creates a new ConnectionConfiguration instance with the specified settings for host, service, user and password.
 Connection newConnection(ConnectionConfiguration cfg)
          Creates a new Connection using the connection settings from the given ConnectionConfiguration
 Connection newConnection(java.lang.String server, java.lang.String service, java.lang.String user, java.lang.String pass)
          Deprecated. please use @{link newConnection(ConnectionConfiguration)
 Connection newConnection(java.lang.String server, java.lang.String service, java.lang.String user, java.lang.String pass, boolean doLoadOnDemand, int type)
          Deprecated. please use @{link newConnection(ConnectionConfiguration)
 
Methods inherited from class org.palo.api.ConnectionFactory
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionFactoryImpl

public ConnectionFactoryImpl()
Method Detail

newConnection

public final Connection newConnection(java.lang.String server,
                                      java.lang.String service,
                                      java.lang.String user,
                                      java.lang.String pass)
Deprecated. please use @{link newConnection(ConnectionConfiguration)

Description copied from class: ConnectionFactory
Creates a new Connection which is connected to the specified palo-server. The default connection is of type HTTP and no load on demand is activated. To define the connection type and to use load on demand please call ConnectionFactory.newConnection(String, String, String, String, boolean, int)

Specified by:
newConnection in class ConnectionFactory
Parameters:
server - the server to connect to.
service - the service to use (corresponds to port numbers given as a string)
user - the username to use for authentication
pass - the password to use for authentication
Returns:
the palo-server connection upon success

newConnection

public final Connection newConnection(java.lang.String server,
                                      java.lang.String service,
                                      java.lang.String user,
                                      java.lang.String pass,
                                      boolean doLoadOnDemand,
                                      int type)
Deprecated. please use @{link newConnection(ConnectionConfiguration)

Description copied from class: ConnectionFactory
Creates a new Connection which is connected to the specified palo-server using specified type (legacy of HTTP). Load on demand can be used. In this case the API tries to load only the information which is currently required.

Specified by:
newConnection in class ConnectionFactory
Parameters:
server - the server to connect to.
service - the service to use (corresponds to port numbers given as a string)
user - the username to use for authentication
pass - the password to use for authentication
doLoadOnDemand - activate load on demand
type - palo server type to be used. Please use one of the defined constants Connection.TYPE_LEGACY or Connection.TYPE_HTTP
Returns:
the palo-server connection upon success

getConfiguration

public final ConnectionConfiguration getConfiguration(java.lang.String host,
                                                      java.lang.String service)
Returns a default ConnectionConfiguration instance. The type is Connection.TYPE_HTTP, load on demand is disabled and timeout is set to #CONNECTION_TIMEOUT.

Specified by:
getConfiguration in class ConnectionFactory
Parameters:
host - host which runs the palo server
service - the service which handles palo requests
Returns:
new ConnectionConfiguration instance

getConfiguration

public final ConnectionConfiguration getConfiguration(java.lang.String host,
                                                      java.lang.String service,
                                                      java.lang.String user,
                                                      java.lang.String password)
Description copied from class: ConnectionFactory
Creates a new ConnectionConfiguration instance with the specified settings for host, service, user and password.

Specified by:
getConfiguration in class ConnectionFactory
Parameters:
host - host which runs the palo server
service - the service which handles palo requests
user - the login name
password - the login password
Returns:
ConnectionConfiguration instance

newConnection

public final Connection newConnection(ConnectionConfiguration cfg)
Description copied from class: ConnectionFactory
Creates a new Connection using the connection settings from the given ConnectionConfiguration

Specified by:
newConnection in class ConnectionFactory
Parameters:
cfg - ConnectionConfiguration containg connection settings
Returns:
the palo-server connection upon success