Package org.jacorb.notification.interfaces

Examples of org.jacorb.notification.interfaces.Message


    public EvaluationResult evaluate( EvaluationContext context )
        throws EvaluationException
    {
        final EvaluationResult _result;

        Message _event = context.getCurrentMessage();

        AbstractTCLNode _left = left();

        if (_left == null) {
            // this is the case when the expression just consists of
            // '$'. $ denotes the current Message.

            return EvaluationResult.fromAny( _event.toAny() );
        }

        switch (_left.getType()) {

        case TCLParserTokenTypes.RUNTIME_VAR:
            RuntimeVariableNode _var = ( RuntimeVariableNode ) _left;

            _result = _event.extractValue( context,
                                        this,
                                        _var );

            break;

        case TCLParserTokenTypes.DOT:
            // fallthrough
        case TCLParserTokenTypes.ASSOC:
            _result = _event.extractValue(context,
                                       this );

            break;
        default:
            // coming here means, we've hit a bug
View Full Code Here


            }

            int idx = _fullQualifiedOperation.lastIndexOf("::");
            String _operation = _fullQualifiedOperation.substring(idx + 2);

            final Message _clonedMessage = (Message) message.clone();

            try
            {
                ((MessageQueueAdapter) messageQueueMap_.get(_operation)).enqeue(_clonedMessage);
            } catch (InterruptedException e)
            {
                _clonedMessage.dispose();
            }
        } catch (NoTranslationException e)
        {
            // ignore
            // Message is not delivered to the connected Consumer
View Full Code Here

    {
        checkStillConnected();

        try
        {
            Message _message = getMessageBlocking();

            try
            {
                return _message.toStructuredEvent();
            } finally
            {
                _message.dispose();
            }
        } catch (InterruptedException e)
        {
            return UNDEFINED_STRUCTURED_EVENT;
        }
View Full Code Here

    public StructuredEvent try_pull_structured_event(BooleanHolder hasEvent) throws Disconnected
    {
        checkStillConnected();

        Message _message = getMessageNoBlock();

        if (_message != null)
        {
            try
            {
                hasEvent.value = true;

                return _message.toStructuredEvent();
            } finally
            {
                _message.dispose();
            }
        }

        hasEvent.value = false;
View Full Code Here

     * @param message
     *            the <code>Message</code> to queue.
     */
    protected void enqueue(Message message)
    {
        Message _copy = (Message) message.clone();

        try
        {
            pendingMessages_.enqeue(_copy);

            if (logger_.isDebugEnabled())
            {
                logger_.debug("enqueue " + message + " to pending Messages.");
            }
        } catch (InterruptedException e)
        {
            _copy.dispose();
            logger_.info("enqueue was interrupted", e);
        }
    }
View Full Code Here

        final List _result = new ArrayList(events.length);
        final MessageFactory _messageFactory = getMessageFactory();
       
        for (int i = 0; i < events.length; ++i)
        {
            final Message _newMessage = _messageFactory.newMessage(events[i], this);
            checkMessageProperties(_newMessage);
            _result.add(_newMessage);
        }
       
        return (Message[]) _result.toArray(new Message[_result.size()]);
View Full Code Here

        resetErrorCounter();
    }

    public boolean pushEvent()
    {
        final Message _message = getMessageNoBlock();

        if (_message != null)
        {
            try
            {
                return deliverMessageWithRetry(_message);
            } finally
            {
                _message.dispose();
            }
        }

        return false;
    }
View Full Code Here

    }

    public void push_structured_event(StructuredEvent structuredEvent) throws Disconnected
    {
        checkStillConnected();
        Message _mesg = getMessageFactory().newMessage(structuredEvent, this);

        checkMessageProperties(_mesg);
        processMessage(_mesg);
    }
View Full Code Here

        return new MessageSupplierDelegate.PullResult(_event, _hasEvent.value);
    }

    public void queueMessages(PullResult data)
    {
        Message _mesg = getMessageFactory().newMessage((StructuredEvent) data.data_, this);

        checkMessageProperties(_mesg);

        processMessage(_mesg);
    }
View Full Code Here

        return new MessageSupplierDelegate.PullResult(_event, _hasEvent.value);
    }

    public void queueMessages(PullResult data)
    {
        Message _message = getMessageFactory().newMessage((Any) data.data_, this);

        checkMessageProperties(_message);

        processMessage(_message);
    }
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.