es.upv.dsic.gti_ia.core
Class AgentsConnection

java.lang.Object
  extended by es.upv.dsic.gti_ia.core.AgentsConnection

public class AgentsConnection
extends Object

This class work to open a Qpid broker connection.

Author:
Sergio Pajares

Field Summary
static org.apache.qpid.transport.Connection connection
          Used to establish a communication with a Qpid broker.
 
Constructor Summary
AgentsConnection()
           
 
Method Summary
static void connect()
          Connects with a Qpid broker taking the input connection parameters from the Settings.xml file.
static void connect(String qpidHost)
          Connects to Qpid broker taking into account the qpidhost parameter and considering the rest as defaults parameters.
static void connect(String qpidHost, int qpidPort, String qpidVhost, String qpdidUser, String qpidPassword, boolean qpidSSL)
          Connects to Qpid broker taking into account all the parameters specified as input.
static void connect(String qpidHost, int qpidPort, String qpidVhost, String qpdidUser, String qpidPassword, boolean qpidSSL, String sasl_mechs)
          Connects to Qpid broker taking into account all the parameters specified as input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

public static org.apache.qpid.transport.Connection connection
Used to establish a communication with a Qpid broker. Can be initialized according to the parameters specified in the settings for an agent.

Constructor Detail

AgentsConnection

public AgentsConnection()
Method Detail

connect

public static void connect()
Connects with a Qpid broker taking the input connection parameters from the Settings.xml file.


connect

public static void connect(String qpidHost,
                           int qpidPort,
                           String qpidVhost,
                           String qpdidUser,
                           String qpidPassword,
                           boolean qpidSSL)
Connects to Qpid broker taking into account all the parameters specified as input.

Parameters:
qpidHost - Host where the broker is.
qpidPort - Port where the broker is listening.
qpidVhost - Name for the Vhost to pass to the QPid broker.
qpdidUser - Username to pass to the QPid broker.
qpidPassword - Password to pass to the QPid broker.
qpidSSL - Boolean indicating whether SSL is being used or not.

connect

public static void connect(String qpidHost,
                           int qpidPort,
                           String qpidVhost,
                           String qpdidUser,
                           String qpidPassword,
                           boolean qpidSSL,
                           String sasl_mechs)
Connects to Qpid broker taking into account all the parameters specified as input.

Parameters:
qpidHost - Host where the broker is.
qpidPort - Port where the broker is listening.
qpidVhost - Name for the Vhost to pass to the QPid broker.
qpdidUser - Username to pass to the QPid broker.
qpidPassword - Password to pass to the QPid broker.
qpidSSL - Boolean indicating whether SSL is being used or not.
sasl_mechs - SASL mechanism used for the secure communication with the broker.

connect

public static void connect(String qpidHost)
Connects to Qpid broker taking into account the qpidhost parameter and considering the rest as defaults parameters. broker installation

Parameters:
qpidHost - Host where the broker is.


Copyright © 2012 GTI-IA. All Rights Reserved.