Package org.apache.qpid.server.model

Examples of org.apache.qpid.server.model.Protocol


        if (excludedProtocols != null)
        {
            String[] excludes = excludedProtocols.split(",");
            for (String exclude : excludes)
            {
                Protocol protocol = Protocol.valueOf(exclude);
                defaultProtocols.remove(protocol);
            }
        }
        String includedProtocols = System.getProperty(BrokerProperties.PROPERTY_BROKER_DEFAULT_AMQP_PROTOCOL_INCLUDES);
        if (includedProtocols != null)
        {
            String[] includes = includedProtocols.split(",");
            for (String include : includes)
            {
                Protocol protocol = Protocol.valueOf(include);
                defaultProtocols.add(protocol);
            }
        }
        _defaultProtocols = Collections.unmodifiableCollection(defaultProtocols);
    }
View Full Code Here


        {
            if (protocols.size() > 1)
            {
                throw new IllegalConfigurationException("Only one protocol can be used on non AMQP port");
            }
            Protocol protocol = protocols.iterator().next();

            if(!broker.isManagementMode() && protocol.getProtocolType() != ProtocolType.HTTP)
            {
                //ManagementMode needs this relaxed to allow its overriding management ports to be inserted.

                //Enforce only a single port of each management protocol, as the plugins will only use one.
                Collection<Port> existingPorts = broker.getPorts();
                for (Port existingPort : existingPorts)
                {
                    Collection<Protocol> portProtocols = existingPort.getProtocols();
                    if (portProtocols != null && portProtocols.contains(protocol))
                    {
                        throw new IllegalConfigurationException("Port for protocol " + protocol + " already exists. Only one management port per protocol can be created.");
                    }
                }
            }

            defaults.put(Port.NAME, portValue + "-" + protocol.name());
            port = new PortAdapter(id, broker, attributes, defaults, broker.getTaskExecutor());

            boolean rmiPort = port.getProtocols().contains(Protocol.RMI);
            if (rmiPort && port.getTransports().contains(Transport.SSL))
            {
View Full Code Here

        Socket socket = new Socket(brokerDetails.getHost(), brokerDetails.getPort());
        socket.setTcpNoDelay(true);
        OutputStream os = socket.getOutputStream();

        byte[] protocolHeader;
        Protocol protocol = getBrokerProtocol();
        switch(protocol)
        {
            case AMQP_0_8:
                protocolHeader = (ProtocolEngineCreator_0_8.getInstance().getHeaderIdentifier());
                break;
View Full Code Here

        if (excludedProtocols != null)
        {
            String[] excludes = excludedProtocols.split(",");
            for (String exclude : excludes)
            {
                Protocol protocol = Protocol.valueOf(exclude);
                defaultProtocols.remove(protocol);
            }
        }
        String includedProtocols = System.getProperty(BrokerProperties.PROPERTY_BROKER_DEFAULT_AMQP_PROTOCOL_INCLUDES);
        if (includedProtocols != null)
        {
            String[] includes = includedProtocols.split(",");
            for (String include : includes)
            {
                Protocol protocol = Protocol.valueOf(include);
                defaultProtocols.add(protocol);
            }
        }
        _defaultProtocols = Collections.unmodifiableCollection(defaultProtocols);
    }
View Full Code Here

        {
            if (protocols.size() > 1)
            {
                throw new IllegalConfigurationException("Only one protocol can be used on non AMQP port");
            }
            Protocol protocol = protocols.iterator().next();

            if(!broker.isManagementMode() && protocol.getProtocolType() != ProtocolType.HTTP)
            {
                //ManagementMode needs this relaxed to allow its overriding management ports to be inserted.

                //Enforce only a single port of each management protocol, as the plugins will only use one.
                Collection<Port> existingPorts = broker.getPorts();
                for (Port existingPort : existingPorts)
                {
                    Collection<Protocol> portProtocols = existingPort.getProtocols();
                    if (portProtocols != null && portProtocols.contains(protocol))
                    {
                        throw new IllegalConfigurationException("Port for protocol " + protocol + " already exists. Only one management port per protocol can be created.");
                    }
                }
            }

            defaults.put(Port.NAME, portValue + "-" + protocol.name());
            port = new NonAmqpPortAdapter(id, broker, attributes, defaults, broker.getTaskExecutor());

            boolean rmiPort = port.getProtocols().contains(Protocol.RMI);
            if (rmiPort && port.getTransports().contains(Transport.SSL))
            {
View Full Code Here

            if (transports.contains(Transport.SSL) || transports.contains(Transport.WSS))
            {
                sslContext = createSslContext();
            }

            Protocol defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();

            _transport = transportProvider.createTransport(transportSet,
                                                           sslContext,
                                                           this,
                                                           getProtocols(),
View Full Code Here

    {
        Set<Protocol> protocols = EnumSet.allOf(Protocol.class);
        Iterator<Protocol> protoIter = protocols.iterator();
        while(protoIter.hasNext())
        {
            Protocol protocol = protoIter.next();
            if(protocol.getProtocolType() != Protocol.ProtocolType.AMQP)
            {
                protoIter.remove();
            }
        }
        return protocols;
View Full Code Here

    public void testProtocolIsExpectedBasedOnTestProfile() throws Exception
    {
        super.setUp();
        final AMQConnection connection = (AMQConnection) getConnection();
        final Protocol expectedBrokerProtocol = getBrokerProtocol();
        final AMQPProtocolVersionWrapper amqpProtocolVersionWrapper = new AMQPProtocolVersionWrapper(expectedBrokerProtocol);
        final ProtocolVersion protocolVersion = connection.getProtocolVersion();
        assertTrue("Connection AMQP protocol " + expectedBrokerProtocol + "is not the same as the test specified protocol " + protocolVersion,
                    areEquivalent(amqpProtocolVersionWrapper, protocolVersion));
        connection.close();
View Full Code Here


                ServerProtocolEngine newDelegate = null;
                byte[] supportedReplyBytes = null;
                byte[] defaultSupportedReplyBytes = null;
                Protocol supportedReplyVersion = null;

                //Check the supported versions for a header match, and if there is one save the
                //delegate. Also save most recent supported version and associated reply header bytes
                for(int i = 0; newDelegate == null && i < _creators.length; i++)
                {
View Full Code Here

            SSLContext sslContext = null;
            if (transports.contains(Transport.SSL) || transports.contains(Transport.WSS))
            {
                sslContext = createSslContext();
            }
            Protocol defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();

            _transport = transportProvider.createTransport(transportSet,
                                                           sslContext,
                                                           this,
                                                           getProtocols(),
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.model.Protocol

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.