Package org.apache.qpid.server.connection

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


    public Session_1_0(final Connection_1_0 connection, final SessionEndpoint endpoint)
    {
        _endpoint = endpoint;
        _connection = connection;
        _subject.getPrincipals().addAll(connection.getSubject().getPrincipals());
        _subject.getPrincipals().add(new SessionPrincipal(this));
    }
View Full Code Here


        super(connection, delegate, name, expiry);
        _transaction = new AsyncAutoCommitTransaction(this.getMessageStore(),this);
        _logSubject = new ChannelLogSubject(this);

        _subject.getPrincipals().addAll(((ServerConnection) connection).getAuthorizedSubject().getPrincipals());
        _subject.getPrincipals().add(new SessionPrincipal(this));

        _transactionTimeoutHelper = new TransactionTimeoutHelper(_logSubject, new CloseAction()
        {
            @Override
            public void doTimeoutAction(String reason)
View Full Code Here

    protected String getActor()
    {
        Subject subject = Subject.getSubject(AccessController.getContext());

        SessionPrincipal sessionPrincipal = getPrincipal(subject, SessionPrincipal.class);
        String message;
        if(sessionPrincipal != null)
        {
            message =  generateSessionMessage(sessionPrincipal.getSession());
        }
        else
        {
            ConnectionPrincipal connPrincipal = getPrincipal(subject, ConnectionPrincipal.class);
View Full Code Here

        {
            sessionModel = null;
        }
        else
        {
            final SessionPrincipal sessionPrincipal = sessionPrincipals.iterator().next();
            sessionModel = sessionPrincipal.getSession();
        }

        if(sessionModel != null)
        {
View Full Code Here

        _channelId = channelId;

        _subject = new Subject(false, session.getAuthorizedSubject().getPrincipals(),
                               session.getAuthorizedSubject().getPublicCredentials(),
                               session.getAuthorizedSubject().getPrivateCredentials());
        _subject.getPrincipals().add(new SessionPrincipal(this));
        _logSubject = new ChannelLogSubject(this);

        _messageStore = messageStore;

        // by default the session is non-transactional
View Full Code Here

        super(connection, delegate, name, expiry);
        _transaction = new AsyncAutoCommitTransaction(this.getMessageStore(),this);
        _logSubject = new ChannelLogSubject(this);

        _subject.getPrincipals().addAll(((ServerConnection) connection).getAuthorizedSubject().getPrincipals());
        _subject.getPrincipals().add(new SessionPrincipal(this));

        _transactionTimeoutHelper = new TransactionTimeoutHelper(_logSubject, new CloseAction()
        {
            @Override
            public void doTimeoutAction(String reason)
View Full Code Here

        {
            sessionModel = null;
        }
        else
        {
            final SessionPrincipal sessionPrincipal = sessionPrincipals.iterator().next();
            sessionModel = sessionPrincipal.getSession();
        }

        if(sessionModel != null)
        {
View Full Code Here

        queueArguments.put(Queue.EXCLUSIVE, exclusive ? ExclusivityPolicy.CONTAINER : ExclusivityPolicy.NONE);
        AMQSessionModel sessionModel = mock(AMQSessionModel.class);
        AMQConnectionModel connectionModel = mock(AMQConnectionModel.class);
        when(sessionModel.getConnectionModel()).thenReturn(connectionModel);
        when(connectionModel.getRemoteContainerName()).thenReturn(queueOwner);
        SessionPrincipal principal = new SessionPrincipal(sessionModel);
        AMQQueue<?> queue = Subject.doAs(new Subject(true,
                                                     Collections.singleton(principal),
                                                     Collections.emptySet(),
                                                     Collections.emptySet()),
                                         new PrivilegedAction<AMQQueue<?>>()
View Full Code Here

    public Session_1_0(final Connection_1_0 connection, final SessionEndpoint endpoint)
    {
        _endpoint = endpoint;
        _connection = connection;
        _subject.getPrincipals().addAll(connection.getSubject().getPrincipals());
        _subject.getPrincipals().add(new SessionPrincipal(this));
    }
View Full Code Here

        _channelId = channelId;

        _subject = new Subject(false, session.getAuthorizedSubject().getPrincipals(),
                               session.getAuthorizedSubject().getPublicCredentials(),
                               session.getAuthorizedSubject().getPrivateCredentials());
        _subject.getPrincipals().add(new SessionPrincipal(this));
        _logSubject = new ChannelLogSubject(this);

        _messageStore = messageStore;

        // by default the session is non-transactional
View Full Code Here

TOP

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

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.