Package org.hornetq.spi.core.protocol

Examples of org.hornetq.spi.core.protocol.ProtocolManager


                                                                    info.getParams());

            if (protocol != null)
            {
               HornetQServerLogger.LOGGER.warnDeprecatedProtocol();
               ProtocolManager protocolManager = protocolMap.get(protocol);

               if (protocolManager == null)
               {
                  throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(protocol);
               }
               else
               {
                  supportedProtocols.put(protocol, protocolManager);
               }
            }

            String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null,
                                                                     info.getParams());

            if (protocols != null)
            {
               String[] actualProtocols = protocols.split(",");

               if (actualProtocols != null)
               {
                  for (String actualProtocol : actualProtocols)
                  {
                     ProtocolManager protocolManager = protocolMap.get(actualProtocol);

                     if (protocolManager == null)
                     {
                        throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(actualProtocol);
                     }
View Full Code Here


      if (server == null)
      {
         throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
      }

      ProtocolManager pmgr = this.getProtocolManager(protocol.toString());

      if (pmgr == null)
      {
         throw HornetQMessageBundle.BUNDLE.unknownProtocol(protocol);
      }

      ConnectionEntry entry = pmgr.createConnectionEntry((Acceptor) component, connection);

      if (isTrace)
      {
         HornetQServerLogger.LOGGER.trace("Connection created " + connection);
      }
View Full Code Here

                                                                          TransportConstants.DEFAULT_PROTOCOL,
                                                                          info.getParams());

            ProtocolType protocol = ProtocolType.valueOf(protocolString.toUpperCase());

            ProtocolManager manager = protocolMap.get(protocol);
           
            ClusterConnection clusterConnection = lookupClusterConnection(info);
           
            Acceptor acceptor = factory.createAcceptor(clusterConnection,
                                                       info.getParams(),
View Full Code Here

      if (server == null)
      {
         throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
      }

      ProtocolManager pmgr = this.getProtocolManager(protocol);

      if (pmgr == null)
      {
         throw new IllegalArgumentException("Unknown protocol " + protocol);
      }

      ConnectionEntry entry = pmgr.createConnectionEntry(acceptor, connection);

      if (isTrace)
      {
         log.trace("Connection created " + connection);
      }
View Full Code Here

            return;
         }
         String protocolToUse = null;
         for (String protocol : protocolMap.keySet())
         {
            ProtocolManager protocolManager = protocolMap.get(protocol);
            if(protocolManager.isProtocol(in.copy(0, 8).array()))
            {
               protocolToUse = protocol;
               break;
            }
         }
         //if we get here we assume we use the core protocol as we match nothing else
         if(protocolToUse == null)
         {
            protocolToUse = HornetQClient.DEFAULT_CORE_PROTOCOL;
         }
         ProtocolManager protocolManagerToUse = protocolMap.get(protocolToUse);
         ConnectionCreator channelHandler = nettyAcceptor.createConnectionCreator();
         ChannelPipeline pipeline = ctx.pipeline();
         protocolManagerToUse.addChannelHandlers(pipeline);
         pipeline.addLast("handler", channelHandler);
         NettyServerConnection connection = channelHandler.createConnection(ctx, protocolToUse, httpEnabled);
         protocolManagerToUse.handshake(connection, new ChannelBufferWrapper(in));
         pipeline.remove(this);
         ctx.flush();
      }
View Full Code Here

            return;
         }
         String protocolToUse = null;
         for (String protocol : protocolMap.keySet())
         {
            ProtocolManager protocolManager = protocolMap.get(protocol);
            if(protocolManager.isProtocol(in.copy(0, 8).array()))
            {
               protocolToUse = protocol;
               break;
            }
         }
         //if we get here we assume we use the core protocol as we match nothing else
         if(protocolToUse == null)
         {
            protocolToUse = HornetQClient.DEFAULT_CORE_PROTOCOL;
         }
         ProtocolManager protocolManagerToUse = protocolMap.get(protocolToUse);
         ConnectionCreator channelHandler = nettyAcceptor.createConnectionCreator();
         ChannelPipeline pipeline = ctx.pipeline();
         protocolManagerToUse.addChannelHandlers(pipeline);
         pipeline.addLast("handler", channelHandler);
         NettyServerConnection connection = channelHandler.createConnection(ctx, protocolToUse, httpEnabled);
         protocolManagerToUse.handshake(connection, new ChannelBufferWrapper(in));
         pipeline.remove(this);
      }
View Full Code Here

                  info.getParams());

            if(protocol != null)
            {
               HornetQServerLogger.LOGGER.warnDeprecatedProtocol();
               ProtocolManager protocolManager = protocolMap.get(protocol);

               if(protocolManager == null)
               {
                  throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(protocol);
               }
               else
               {
                  supportedProtocols.put(protocol, protocolManager);
               }
            }

            String protocols = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOLS_PROP_NAME, null,
                  info.getParams());

            if(protocols != null)
            {
               String[] actualProtocols = protocols.split(",");

               if(actualProtocols != null)
               {
                  for (String actualProtocol : actualProtocols)
                  {
                     ProtocolManager protocolManager = protocolMap.get(actualProtocol);

                     if(protocolManager == null)
                     {
                        throw HornetQMessageBundle.BUNDLE.noProtocolManagerFound(actualProtocol);
                     }
View Full Code Here

      if (server == null)
      {
         throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
      }

      ProtocolManager pmgr = this.getProtocolManager(protocol.toString());

      if (pmgr == null)
      {
         throw HornetQMessageBundle.BUNDLE.unknownProtocol(protocol);
      }

      ConnectionEntry entry = pmgr.createConnectionEntry((Acceptor) component, connection);

      if (isTrace)
      {
         HornetQServerLogger.LOGGER.trace("Connection created " + connection);
      }
View Full Code Here

                                                                          TransportConstants.DEFAULT_PROTOCOL,
                                                                          info.getParams());

            ProtocolType protocol = ProtocolType.valueOf(protocolString.toUpperCase());

            ProtocolManager manager = protocolMap.get(protocol);

            Acceptor acceptor = factory.createAcceptor(info.getParams(),
                                                       new DelegatingBufferHandler(manager),
                                                       manager,
                                                       this,
View Full Code Here

      if (server == null)
      {
         throw new IllegalStateException("Unable to create connection, server hasn't finished starting up");
      }

      ProtocolManager pmgr = this.getProtocolManager(protocol);

      if (pmgr == null)
      {
         throw new IllegalArgumentException("Unknown protocol " + protocol);
      }

      ConnectionEntry entry = pmgr.createConnectionEntry(connection);

      connections.put(connection.getID(), entry);

      if (config.isBackup())
      {
View Full Code Here

TOP

Related Classes of org.hornetq.spi.core.protocol.ProtocolManager

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.