Package org.hornetq.api.core

Examples of org.hornetq.api.core.TransportConfiguration


      TransportConfiguration[] tcConfigs = (TransportConfiguration[])Array.newInstance(TransportConfiguration.class,
                                                                                       connectorNames.size());
      int count = 0;
      for (String connectorName : connectorNames)
      {
         TransportConfiguration connector = configuration.getConnectorConfigurations().get(connectorName);

         if (connector == null)
         {
            HornetQServerLogger.LOGGER.bridgeNoConnector(connectorName);
View Full Code Here


   
    private static ClientSessionFactory createFactory(){
      try {
      Map<String, Object> connectionParams = new HashMap<String, Object>();
      connectionParams.put(TransportConstants.PORT_PROP_NAME, 8050);
      TransportConfiguration transportConfiguration = new TransportConfiguration(
          "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory",
          connectionParams);
      if (serverLocator == null) {
      serverLocator = HornetQClient
          .createServerLocatorWithoutHA(transportConfiguration);
View Full Code Here

        configuration.setSecurityEnabled(false);

        Map<String, Object> connectionParams = new HashMap<String, Object>();
        connectionParams.put(TransportConstants.PORT_PROP_NAME, 8050);

        TransportConfiguration transpConf = new TransportConfiguration(NettyAcceptorFactory.class.getName(), connectionParams);

        HashSet<TransportConfiguration> setTransp = new HashSet<TransportConfiguration>();
        setTransp.add(transpConf);

        configuration.setAcceptorConfigurations(setTransp);
View Full Code Here

                    } default: {
                        clazz = null;
                        break;
                    }
                }
                acceptors.put(acceptorName, new TransportConfiguration(clazz, parameters, acceptorName));
            }
            configuration.setAcceptorConfigurations(new HashSet<TransportConfiguration>(acceptors.values()));
        }
    }
View Full Code Here

                    } default: {
                        clazz = null;
                        break;
                    }
                }
                connectors.put(connectorName, new TransportConfiguration(clazz, parameters, connectorName));
            }
            configuration.setConnectorConfigurations(connectors);
        }
    }
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

         TransportConfiguration[] configs = new TransportConfiguration[cfConfig.getConnectorNames().size()];

         int count = 0;
         for (String name : cfConfig.getConnectorNames())
         {
            TransportConfiguration connector = server.getConfiguration().getConnectorConfigurations().get(name);
            if (connector == null)
            {
               throw new HornetQException(HornetQException.ILLEGAL_STATE, "Connector '" + name +
                                                                          "' not found on the main configuration file");
            }
View Full Code Here

                                                                                : getDiscoveryAddress();
      if (connectorClassName != null)
      {
         Map<String, Object> connectionParams =
               overrideConnectionParameters(overrideProperties.getParsedConnectionParameters(),raProperties.getParsedConnectionParameters());
         TransportConfiguration transportConf = new TransportConfiguration(connectorClassName, connectionParams);

         String backUpCOnnectorClassname = overrideProperties.getBackupConnectorClassName() != null ? overrideProperties.getBackupConnectorClassName()
                                                                                                   : getBackupConnectorClassName();
         Map<String, Object> backupConnectionParams =
               overrideConnectionParameters(overrideProperties.getParsedBackupConnectionParameters(),
                     getBackupConnectionParameters());
         TransportConfiguration backup = backUpCOnnectorClassname == null ? null
                                                                         : new TransportConfiguration(backUpCOnnectorClassname,
                                                                                                      backupConnectionParams);

         cf = HornetQJMSClient.createConnectionFactory(transportConf, backup);
      }
      else if (discoveryAddress != null)
View Full Code Here

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();

      locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName()));

      locator.setClientFailureCheckPeriod(ClientCrashTest.PING_PERIOD);
      locator.setConnectionTTL(ClientCrashTest.CONNECTION_TTL);
      sf = locator.createSessionFactory();
   }
View Full Code Here

   public void testSSL() throws Exception
   {
      String text = RandomUtil.randomString();

      TransportConfiguration tc = new TransportConfiguration(NettyConnectorFactory.class.getName());
      tc.getParams().put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
      tc.getParams().put(TransportConstants.KEYSTORE_PATH_PROP_NAME, TransportConstants.DEFAULT_KEYSTORE_PATH);
      tc.getParams().put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, TransportConstants.DEFAULT_KEYSTORE_PASSWORD);

      ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(tc);
      ClientSessionFactory sf = locator.createSessionFactory();
      ClientSession session = sf.createSession(false, true, true);
      session.createQueue(CoreClientOverSSLTest.QUEUE, CoreClientOverSSLTest.QUEUE, false);
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.