Package org.apache.qpid.server.model

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


    }

    @Override
    protected boolean setState(State currentState, State desiredState)
    {
        State state = _state.get();
        if (desiredState == State.ACTIVE)
        {
            if ((state == State.INITIALISING || state == State.QUIESCED || state == State.STOPPED)
                    && _state.compareAndSet(state, State.ACTIVE))
            {
View Full Code Here


            throws AccessControlException, IllegalArgumentException
    {
        attributes = new HashMap<String, Object>(attributes);

        String         name     = MapValueConverter.getStringAttribute(Exchange.NAME, attributes, null);
        State          state    = MapValueConverter.getEnumAttribute(State.class, Exchange.STATE, attributes, State.ACTIVE);
        boolean        durable  = MapValueConverter.getBooleanAttribute(Exchange.DURABLE, attributes, false);
        LifetimePolicy lifetime = MapValueConverter.getEnumAttribute(LifetimePolicy.class, Exchange.LIFETIME_POLICY, attributes, LifetimePolicy.PERMANENT);
        String         type     = MapValueConverter.getStringAttribute(Exchange.TYPE, attributes, null);
        long           ttl      = MapValueConverter.getLongAttribute(Exchange.TIME_TO_LIVE, attributes, 0l);
View Full Code Here

                attributes.put(SimpleAMQQueue.QPID_SHARED_MSG_GROUP, SimpleAMQQueue.SHARED_MSG_GROUP_ARG_VALUE);
            }
        }

        String         name     = MapValueConverter.getStringAttribute(Queue.NAME, attributes, null);
        State          state    = MapValueConverter.getEnumAttribute(State.class, Queue.STATE, attributes, State.ACTIVE);
        boolean        durable  = MapValueConverter.getBooleanAttribute(Queue.DURABLE, attributes, false);
        LifetimePolicy lifetime = MapValueConverter.getEnumAttribute(LifetimePolicy.class, Queue.LIFETIME_POLICY, attributes, LifetimePolicy.PERMANENT);
        long           ttl      = MapValueConverter.getLongAttribute(Queue.TIME_TO_LIVE, attributes, 0l);
        boolean        exclusive= MapValueConverter.getBooleanAttribute(Queue.EXCLUSIVE, attributes, false);
View Full Code Here

    @Override
    public State getActualState()
    {
        if (_virtualHost == null)
        {
            State state = (State)super.getAttribute(STATE);
            if (state == null)
            {
                return State.INITIALISING;
            }
            return state;
View Full Code Here

        _accessControl = accessControl;
        _broker = broker;
        _supportedAttributes = createSupportedAttributes(attributeNames);
        addParent(Broker.class, broker);

        State state = MapValueConverter.getEnumAttribute(State.class, STATE, attributes, State.INITIALISING);
        _state = new AtomicReference<State>(state);

        // set attributes now after all attribute names are known
        if (attributes != null)
        {
View Full Code Here

    @Override
    public boolean setState(State currentState, State desiredState)
            throws IllegalStateTransitionException, AccessControlException
    {
        State state = _state.get();

        if(desiredState == State.DELETED)
        {
            return _state.compareAndSet(state, State.DELETED);
        }
View Full Code Here

        super(parentsMap(broker), attributes);


        _broker = broker;

        State state = MapValueConverter.getEnumAttribute(State.class, STATE, attributes, State.UNINITIALIZED);
        _state = new AtomicReference<State>(state);
    }
View Full Code Here

    protected void reloadVirtualHost()
    {
        assertEquals("Virtual host node is not active", State.ACTIVE, _virtualHost.getState());
        _node.stop();
        State currentState = _node.getState();
        assertEquals("Virtual host node is not stopped", State.STOPPED, currentState);

        _node.start();
        currentState = _node.getState();
        assertEquals("Virtual host node is not active", State.ACTIVE, currentState);
View Full Code Here

                getTaskExecutor().submit(new Task<Void>()
                {
                    @Override
                    public Void execute()
                    {
                        State state = getState();
                        if (state == State.ACTIVE)
                        {
                            try
                            {
                                stopAndSetStateTo(State.ERRORED);
View Full Code Here

        _lastTransactionId = lastTransactionId;
    }

    private void updateModelStateFromRole(final String role)
    {
        State currentState = _state.get();
        if (currentState == State.DELETED)
        {
            return;
        }
View Full Code Here

TOP

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

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.