Package org.apache.qpid.server.protocol

Examples of org.apache.qpid.server.protocol.AMQConnectionModel


        final Iterator<AMQConnectionModel> connections =
                        ((ServerConnection)conn).getVirtualHost().getConnectionRegistry().getConnections().iterator();
        while(connections.hasNext())
        {
            final AMQConnectionModel amqConnectionModel = (AMQConnectionModel) connections.next();
            if (userId.equals(amqConnectionModel.getUserName()) && !amqConnectionModel.isSessionNameUnique(name))
            {
                return false;
            }
        }
        return true;
View Full Code Here


         * 1 - User ID
         * 2 - IP
         * 3 - Virtualhost
         * 4 - Channel ID
         */
        AMQConnectionModel connection = session.getConnectionModel();
        setLogStringWithFormat(CHANNEL_FORMAT,
                               connection == null ? -1L : connection.getConnectionId(),
                               (connection == null || connection.getPrincipalAsString() == null) ? "?" : connection.getPrincipalAsString(),
                               (connection == null || connection.getRemoteAddressString() == null) ? "?" : connection.getRemoteAddressString(),
                               (connection == null || connection.getVirtualHostName() == null) ? "?" : connection.getVirtualHostName(),
                               session.getChannelId());

    }
View Full Code Here

        return session;
    }

    public static AMQSessionModel createSession(int channelId) throws Exception
    {
        AMQConnectionModel session = createConnection();
        return createSession(channelId, session);
    }
View Full Code Here

    }

    public static AMQConnectionModel createConnection(String hostName) throws Exception
    {
        VirtualHost virtualHost = createVirtualHost(hostName);
        AMQConnectionModel connection = mock(AMQConnectionModel.class);
        return connection;
    }
View Full Code Here

        {
            _logger.debug("Closing connection registry :" + _registry.size() + " connections.");
        }
        while (!_registry.isEmpty())
        {
            AMQConnectionModel connection = _registry.get(0);
            closeConnection(connection, AMQConstant.CONNECTION_FORCED, replyText);
        }
    }
View Full Code Here

        final Iterator<AMQConnectionModel> connections =
                        ((ServerConnection)conn).getVirtualHost().getConnectionRegistry().getConnections().iterator();
        while(connections.hasNext())
        {
            final AMQConnectionModel amqConnectionModel = (AMQConnectionModel) connections.next();
            if (userId.equals(amqConnectionModel.getUserName()) && !amqConnectionModel.isSessionNameUnique(name))
            {
                return false;
            }
        }
        return true;
View Full Code Here

        final Iterator<AMQConnectionModel> connections =
                        ((ServerConnection)conn).getVirtualHost().getConnectionRegistry().getConnections().iterator();
        while(connections.hasNext())
        {
            final AMQConnectionModel amqConnectionModel = (AMQConnectionModel) connections.next();
            if (userId.equals(amqConnectionModel.getUserName()) && !amqConnectionModel.isSessionNameUnique(name))
            {
                return false;
            }
        }
        return true;
View Full Code Here

     * @return the requested SessionAdapter or null if it can't be found.
     */
    private SessionAdapter getSessionAdapter(AMQSessionModel session)
    {
        // Retrieve the ConnectionModel associated with the SessionModel as a key to lookup the ConnectionAdapter.
        AMQConnectionModel connectionKey = session.getConnectionModel();

        // Lookup the ConnectionAdapter, from which we should be able to retrieve the SessionAdapter we really want.
        ConnectionAdapter connectionAdapter = _vhost.getConnectionAdapter(connectionKey);
        if (connectionAdapter == null)
        {
View Full Code Here

    /** Close all of the currently open connections. */
    public void close()
    {
        while (!_registry.isEmpty())
        {
            AMQConnectionModel connection = _registry.get(0);
            closeConnection(connection, AMQConstant.INTERNAL_ERROR, "Broker is shutting down");
        }
    }
View Full Code Here

     * @return the requested SessionAdapter or null if it can't be found.
     */
    private SessionAdapter getSessionAdapter(AMQSessionModel session)
    {
        // Retrieve the ConnectionModel associated with the SessionModel as a key to lookup the ConnectionAdapter.
        AMQConnectionModel connectionKey = session.getConnectionModel();

        // Lookup the ConnectionAdapter, from which we should be able to retrieve the SessionAdapter we really want.
        ConnectionAdapter connectionAdapter = _vhost.getConnectionAdapter(connectionKey);
        if (connectionAdapter == null)
        {
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.protocol.AMQConnectionModel

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.