Package org.hornetq.api.core

Examples of org.hornetq.api.core.TransportConfiguration


            connectionParams = raProperties.getParsedConnectionParameters();
         }

         for (int i = 0; i < connectorClassName.size(); i++)
         {
            TransportConfiguration tc;
            if(connectionParams == null || i >= connectionParams.size())
            {
               tc = new TransportConfiguration(connectorClassName.get(i));
               log.debug("No connector params provided using default");
            }
            else
            {
               tc = new TransportConfiguration(connectorClassName.get(i), connectionParams.get(i));
            }

            transportConfigurations[i] = tc;
         }
        
View Full Code Here


         int attempts = 0;
         do
         {
            retry = false;

            TransportConfiguration tc = selectConnector();

            // try each factory in the list until we find one which works

            try
            {
View Full Code Here

         {
            factory.close();
            return;
         }

         TransportConfiguration backup = null;

         if (ha)
         {
            backup = topology.getBackupForConnector(factory.getConnectorConfiguration());
         }
View Full Code Here

      for (int i = 0; i < connectorNodes.getLength(); i++)
      {
         Element connectorNode = (Element)connectorNodes.item(i);

         TransportConfiguration connectorConfig = parseTransportConfiguration(connectorNode);

         if (connectorConfig.getName() == null)
         {
            FileConfigurationParser.log.warn("Cannot deploy a connector with no name specified.");

            continue;
         }

         if (config.getConnectorConfigurations().containsKey(connectorConfig.getName()))
         {
            FileConfigurationParser.log.warn("There is already a connector with name " + connectorConfig.getName() +
                                             " deployed. This one will not be deployed.");

            continue;
         }

         config.getConnectorConfigurations().put(connectorConfig.getName(), connectorConfig);
      }

      NodeList acceptorNodes = e.getElementsByTagName("acceptor");

      for (int i = 0; i < acceptorNodes.getLength(); i++)
      {
         Element acceptorNode = (Element)acceptorNodes.item(i);

         TransportConfiguration acceptorConfig = parseTransportConfiguration(acceptorNode);

         config.getAcceptorConfigurations().add(acceptorConfig);
      }

      NodeList bgNodes = e.getElementsByTagName("broadcast-group");
View Full Code Here

         Node nValue = attributes.getNamedItem("value");

         params.put(key, nValue.getTextContent());
      }

      return new TransportConfiguration(clazz, params, name);
   }
View Full Code Here

   {
      String targetNodeIdUse = targetNodeID;
      TopologyMember nodeUse = targetNode;
      if (targetNodeIdUse != null && nodeUse != null)
      {
         TransportConfiguration configs[] = new TransportConfiguration[2]; // live and backup
         int numberOfConfigs = 0;

         if (nodeUse.getLive() != null)
         {
            configs[numberOfConfigs++] = nodeUse.getLive();
View Full Code Here

      if (HornetQServerLogger.LOGGER.isDebugEnabled())
      {
         HornetQServerLogger.LOGGER.debug(this + "::NodeAnnounced, backup=" + backup + nodeID + connectorPair);
      }

      TransportConfiguration live = connectorPair.getA();
      TransportConfiguration backupTC = connectorPair.getB();
      TopologyMemberImpl newMember = new TopologyMemberImpl(nodeID, nodeName, live, backupTC);
      newMember.setUniqueEventID(uniqueEventID);
      if (backup)
      {
         topology.updateBackup(new TopologyMemberImpl(nodeID, nodeName, live, backupTC));
View Full Code Here

      HashMap<String, Object> transportConfig = new HashMap<String, Object>();
      transportConfig.put(TransportConstants.SERVER_ID_PROP_NAME, configuration.getInVmId());


      ServerLocator consumerLocator = new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));
      HornetQRestLogger.LOGGER.debug("Created ServerLocator: " + consumerLocator);

      if (configuration.getConsumerWindowSize() != -1)
      {
         consumerLocator.setConsumerWindowSize(configuration.getConsumerWindowSize());
      }

      ClientSessionFactory consumerSessionFactory = consumerLocator.createSessionFactory();
      HornetQRestLogger.LOGGER.debug("Created ClientSessionFactory: " + consumerSessionFactory);

      ServerLocator defaultLocator =  new ServerLocatorImpl(false, new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));

      ClientSessionFactory sessionFactory = defaultLocator.createSessionFactory();

      LinkStrategy linkStrategy = new LinkHeaderLinkStrategy();
      if (configuration.isUseLinkHeaders())
View Full Code Here

   protected void initDefaults()
   {
     if (locator == null)
     {
        locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName()));
     }
      if (sessionFactory == null)
      {
        try
        {
View Full Code Here

         HornetQServerLogger.LOGGER.clusterConnectionNoForwardAddress();

         return null;
      }

      TransportConfiguration connector = configuration.getConnectorConfigurations().get(config.getConnectorName());

      if (connector == null)
      {
         HornetQServerLogger.LOGGER.clusterConnectionNoConnector(config.getConnectorName());
         return null;
View Full Code Here

TOP

Related Classes of org.hornetq.api.core.TransportConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.