Package org.apache.qpid.server.connection

Examples of org.apache.qpid.server.connection.ConnectionPrincipal


        final InetSocketAddress inetSocketAddress = new InetSocketAddress(inetAddress, 1);

        AMQConnectionModel connectionModel = mock(AMQConnectionModel.class);
        when(connectionModel.getRemoteAddress()).thenReturn(inetSocketAddress);

        subject.getPrincipals().add(new ConnectionPrincipal(connectionModel));

        Subject.doAs(subject, new PrivilegedExceptionAction<Object>()
        {
            @Override
            public Object run() throws Exception
View Full Code Here


        final InetSocketAddress inetSocketAddress = new InetSocketAddress(inetAddress, 1);

        AMQConnectionModel connectionModel = mock(AMQConnectionModel.class);
        when(connectionModel.getRemoteAddress()).thenReturn(inetSocketAddress);

        subject.getPrincipals().add(new ConnectionPrincipal(connectionModel));

        Subject.doAs(subject, new PrivilegedExceptionAction<Object>()
        {
            @Override
            public Object run() throws Exception
View Full Code Here

        {
            message =  generateSessionMessage(sessionPrincipal.getSession());
        }
        else
        {
            ConnectionPrincipal connPrincipal = getPrincipal(subject, ConnectionPrincipal.class);

            if(connPrincipal != null)
            {
                message = generateConnectionMessage(connPrincipal.getConnection());
            }
            else
            {
                TaskPrincipal taskPrincipal = getPrincipal(subject, TaskPrincipal.class);
                if(taskPrincipal != null)
View Full Code Here

        _broker = broker;
        _port = port;
        _transport = transport;
        _conn = conn;
        _connectionId = connectionId;
        _subject.getPrincipals().add(new ConnectionPrincipal(this));
        _subjectCreator = subjectCreator;

    }
View Full Code Here

    private volatile boolean _stopped;

    public ServerConnection(final long connectionId, Broker broker)
    {
        _connectionId = connectionId;
        _authorizedSubject.getPrincipals().add(new ConnectionPrincipal(this));
        _broker = broker;
    }
View Full Code Here

        _stateManager = new AMQStateManager(broker, this);
        _codecFactory = new AMQCodecFactory(true, this);
        _connectionID = connectionId;
        _logSubject = new ConnectionLogSubject(this);

        _authorizedSubject.getPrincipals().add(new ConnectionPrincipal(this));
        runAsSubject(new PrivilegedAction<Void>()
        {

            @Override
            public Void run()
View Full Code Here

    private int _messageCompressionThreshold;

    public ServerConnection(final long connectionId, Broker broker)
    {
        _connectionId = connectionId;
        _authorizedSubject.getPrincipals().add(new ConnectionPrincipal(this));
        _broker = broker;

        _messagesDelivered = new StatisticsCounter("messages-delivered-" + getConnectionId());
        _dataDelivered = new StatisticsCounter("data-delivered-" + getConnectionId());
        _messagesReceived = new StatisticsCounter("messages-received-" + getConnectionId());
View Full Code Here

        _stateManager = new AMQStateManager(broker, this);
        _decoder = new AMQDecoder(true, this);
        _connectionID = connectionId;
        _logSubject = new ConnectionLogSubject(this);

        _authorizedSubject.getPrincipals().add(new ConnectionPrincipal(this));
        runAsSubject(new PrivilegedAction<Void>()
        {

            @Override
            public Void run()
View Full Code Here

    }

    private String sendLogMessage()
    {
        final String message = "test logging";
        Subject subject = new Subject(false, Collections.singleton(new ConnectionPrincipal(getConnection())), Collections.emptySet(), Collections.emptySet());
        Subject.doAs(subject, new PrivilegedAction<Object>()
        {
            @Override
            public Object run()
            {
View Full Code Here

        final InetSocketAddress inetSocketAddress = new InetSocketAddress(inetAddress, 1);

        AMQConnectionModel connectionModel = mock(AMQConnectionModel.class);
        when(connectionModel.getRemoteAddress()).thenReturn(inetSocketAddress);

        subject.getPrincipals().add(new ConnectionPrincipal(connectionModel));

        Subject.doAs(subject, new PrivilegedExceptionAction<Object>()
        {
            @Override
            public Object run() throws Exception
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.connection.ConnectionPrincipal

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.