Package org.jacorb.notification.interfaces

Examples of org.jacorb.notification.interfaces.Message


    protected final Message removeFirstElement(Comparator comp)
    {
        final List _entries = copyAllEntries();
        Collections.sort(_entries, comp);
       
        final Message _mesg = (Message) _entries.remove(0);

        heap_.clear();
        heap_.addAll(_entries);
       
        return _mesg;
View Full Code Here


        {
            Message[] allMessages = queue_.getAllMessages(false);

            for (int i = 0; i < allMessages.length; i++)
            {
                Message message = allMessages[i];
                message.dispose();
            }
        } catch (InterruptedException e)
        {
            // should not happen as above call does not wait.
        }
View Full Code Here

            request.arguments(_params);

            final String _operationName = getFullQualifiedName(request.operation());

            final Message _mesg = getMessageFactory().newMessage(supportedInterface_, _operationName,
                    _params, TypedProxyPushConsumerImpl.this);

            processMessage(_mesg);
        }
View Full Code Here

    }

    public EvaluationResult evaluate( EvaluationContext context )
        throws EvaluationException
    {
        final Message _event = context.getCurrentMessage();
        final EvaluationResult _result;

        switch (_event.getType())
        {
            case Message.TYPE_ANY:
                _result = expandedPath_.evaluate(context);
                break;

            case Message.TYPE_STRUCTURED:
                String _domainName = _event.toStructuredEvent().header.fixed_header.event_name;
                _result = new EvaluationResult();
                _result.setString(_domainName);
                break;

            default:
View Full Code Here

    {
        final List _sorted = (List) linkedList_.clone();

        Collections.sort(_sorted, QueueUtil.ASCENDING_TIMEOUT_COMPARATOR);

        final Message _event = (Message) _sorted.get(0);

        linkedList_.remove(_event);

        return _event;
    }
View Full Code Here

    {
        final List _sorted = (List) linkedList_.clone();

        Collections.sort(_sorted, QueueUtil.ASCENDING_PRIORITY_COMPARATOR);

        final Message _event = (Message) _sorted.get(0);

        linkedList_.remove(_event);

        return _event;
    }
View Full Code Here

    private Message updatePriority(int indexOfCurrentEvent, Message message)
    {
        AnyHolder _priorityFilterResult = new AnyHolder();

        Message _currentMessage = message;

        try
        {
            boolean priorityMatch = message.match(arrayCurrentFilterStage_[indexOfCurrentEvent]
                    .getPriorityFilter(), _priorityFilterResult);

            if (priorityMatch)
            {
                _currentMessage = (Message) getMessage().clone();

                _currentMessage.setPriority(_priorityFilterResult.value.extract_long());
            }
        } catch (UnsupportedFilterableData e)
        {
            if (logger_.isDebugEnabled())
            {
View Full Code Here

    }

    private Message updateTimeout(int indexOfCurrentFilterStage, Message message)
    {
        AnyHolder _lifetimeFilterResult = new AnyHolder();
        Message _currentMessage = message;

        try
        {
            boolean lifetimeMatch = _currentMessage.match(
                    arrayCurrentFilterStage_[indexOfCurrentFilterStage].getLifetimeFilter(),
                    _lifetimeFilterResult);

            if (lifetimeMatch && (_currentMessage == getMessage()))
            {
                // LifeTime Mapping Filter matched and current Message
                // was not copied yet. This depends on the fact that
                // updatePriority was run before.

                _currentMessage = (Message) getMessage().clone();

                _currentMessage.setTimeout(_lifetimeFilterResult.value.extract_long());
            }

        } catch (UnsupportedFilterableData e)
        {
            if (logger_.isDebugEnabled())
View Full Code Here

        {
            boolean _forward = false;

            if (!arrayCurrentFilterStage_[x].isDestroyed())
            {
                Message _currentMessage = getMessage();

                if (arrayCurrentFilterStage_[x].hasPriorityFilter())
                {
                    _currentMessage = updatePriority(x, _currentMessage);
                }

                if (arrayCurrentFilterStage_[x].hasLifetimeFilter())
                {
                    _currentMessage = updateTimeout(x, _currentMessage);
                }

                if (_currentMessage != getMessage())
                {
                    // MappingFilter attached to a particular
                    // FilterStage did change (Timeout or Priority)
                    // the current Message.
                    // store changed Message in Map for later use.
                    changedMessages_.putAlternateMessage(arrayCurrentFilterStage_[x],
                            _currentMessage);
                }

                _forward = _currentMessage.match(arrayCurrentFilterStage_[x]);
            }

            if (_forward)
            {
                // the subsequent destination filters need to be eval'd
View Full Code Here

        message_ = message;
    }

    public Message removeMessage()
    {
        Message _mesg = message_;

        message_ = null;

        return _mesg;
    }
View Full Code Here

TOP

Related Classes of org.jacorb.notification.interfaces.Message

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.