org.apache.qpid.management.configuration
Class BrokerConnectionData

java.lang.Object
  extended by org.apache.qpid.management.configuration.BrokerConnectionData

public class BrokerConnectionData
extends Object

Value object which is holding connection data for a specific broker.


Constructor Summary
BrokerConnectionData()
          Builds a new empty broker connection data object.
BrokerConnectionData(String host, int port, String virtualHost, String username, String password, int initialPoolCapacity, int maxPoolCapacity, long waitTimeout)
          Builds a connection data with the given parameters.
 
Method Summary
 boolean equals(Object object)
           
 String getHost()
          Returns the value of the host property.
 int getInitialPoolCapacity()
          Returns the initial connection pool capacity.
 int getMaxPoolCapacity()
          Returns the max number of allowed connections that can be opened.
 long getMaxWaitTimeout()
          Returns the max wait timeout for retrieving an available connections from the pool.
 String getPassword()
          Returns the value of the password property.
 int getPort()
          Returns the value of the port property.
 String getUsername()
          Returns the value of the username property.
 String getVirtualHost()
          Returns the value of the virtual host property.
 int hashCode()
           
(package private)  void setHost(String host)
          Sets the value of host property for this connection data.
 void setInitialPoolCapacity(String capacity)
          Sets the initial connection pool capacity.
 void setMaxPoolCapacity(String value)
          Sets the max number of allowed connections that can be opened.
 void setMaxWaitTimeout(String value)
          Sets the max wait timeout for retrieving an available connections from the pool.
(package private)  void setPassword(String password)
          Sets the value of password property for this connection data.
(package private)  void setPort(String port)
          Sets the value of port property for this connection data.
(package private)  void setUsername(String username)
          Sets the value of username property for this connection data.
(package private)  void setVirtualHost(String virtualHost)
          Sets the value of virtual host property for this connection data.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrokerConnectionData

public BrokerConnectionData(String host,
                            int port,
                            String virtualHost,
                            String username,
                            String password,
                            int initialPoolCapacity,
                            int maxPoolCapacity,
                            long waitTimeout)
Builds a connection data with the given parameters.

Parameters:
host - the hostname where the broker is running.
port - the port where the broker is running.
username - the username for connecting with the broker.
password - the password for connecting with the broker.
virtualHost - the virtual host.
initialPoolCapacity - the number of connections that must be immediately opened.
maxPoolCapacity - the maximum number of opened connection.
maxWaitTimeout - the maximum amount of time that a client will wait for obtaining a connection.

BrokerConnectionData

BrokerConnectionData()
Builds a new empty broker connection data object.

Method Detail

setHost

void setHost(String host)
Sets the value of host property for this connection data.

Parameters:
host - the host name.

setPort

void setPort(String port)
Sets the value of port property for this connection data.

Parameters:
port - the port.

setVirtualHost

void setVirtualHost(String virtualHost)
Sets the value of virtual host property for this connection data.

Parameters:
virtualHost - the virtual host.

setUsername

void setUsername(String username)
Sets the value of username property for this connection data.

Parameters:
username - the username.

setPassword

void setPassword(String password)
Sets the value of password property for this connection data.

Parameters:
password - the password.

getHost

public String getHost()
Returns the value of the host property.

Returns:
the value of the host property.

getPort

public int getPort()
Returns the value of the port property.

Returns:
the value of the port property.

getVirtualHost

public String getVirtualHost()
Returns the value of the virtual host property.

Returns:
the value of the virtual host property.

getUsername

public String getUsername()
Returns the value of the username property.

Returns:
the value of the username property.

getPassword

public String getPassword()
Returns the value of the password property.

Returns:
the value of the password property.

toString

public String toString()
Overrides:
toString in class Object

setMaxPoolCapacity

public void setMaxPoolCapacity(String value)
Sets the max number of allowed connections that can be opened.

Parameters:
value - the max number of allowed connections that can be opened.
Throws:
NumberFormatException - if the given value is not a valid integer.

setMaxWaitTimeout

public void setMaxWaitTimeout(String value)
Sets the max wait timeout for retrieving an available connections from the pool.

Parameters:
value - the max wait timeout for retrieving an available connections from the pool..
Throws:
NumberFormatException - if the given value is not a valid long.

getMaxPoolCapacity

public int getMaxPoolCapacity()
Returns the max number of allowed connections that can be opened.

Returns:
the max number of allowed connections that can be opened.

getMaxWaitTimeout

public long getMaxWaitTimeout()
Returns the max wait timeout for retrieving an available connections from the pool.

Returns:
the max wait timeout for retrieving an available connections from the pool.

setInitialPoolCapacity

public void setInitialPoolCapacity(String capacity)
Sets the initial connection pool capacity.

Parameters:
capacity - the initial connection pool capacity.

getInitialPoolCapacity

public int getInitialPoolCapacity()
Returns the initial connection pool capacity.

Returns:
the initial connection pool capacity.

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Licensed to the Apache Software Foundation