org.jacorb.notification.interfaces
Interface MessageConsumer

All Superinterfaces:
Disposable
All Known Implementing Classes:
AbstractProxySupplier, ECProxyPullSupplierImpl, ECProxyPushSupplierImpl, ProxyPullSupplierImpl, ProxyPushSupplierImpl, SequenceProxyPullSupplierImpl, SequenceProxyPushSupplierImpl, StructuredProxyPullSupplierImpl, StructuredProxyPushSupplierImpl

public interface MessageConsumer
extends Disposable

The interface MessageConsumer provides an abstraction of an ProxySupplier.
The MessageConsumer is responsible to maintain the Connection to the real Consumer. To deliver a Message the MessageConsumer converts the Message to the appropiate Format (Any, StructuredEvent, Sequence of StructuredEvent) required by its Consumer and delivers it.

Version:
$Id: MessageConsumer.java,v 1.6 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Method Summary
 void deliverMessage(Message m)
          Deliver a Message to the associated Consumer.
 void deliverPendingData()
          process pending work. push events to its connected (Push)Consumer.
 void disableDelivery()
          Disable Deliveries. this MessageConsumer may not invoke remote operations. events are enqueued instead.
 void enableDelivery()
          activate deliveries. this MessageConsumer may invoke remote operations again.
 int getErrorCounter()
          access the current error count for this MessageConsumer.
 int getErrorThreshold()
          access the error threshold for this MessageConsumer. if the error count exeeds the threshold the MessageConsumer will be disconnected.
 TaskExecutor getExecutor()
           
 boolean hasPendingData()
          check if this MessageConsumer has pending work to do. pending work is to push events to its connected (Push)Consumer.
 int incErrorCounter()
          increment the current error count by one for this MessageConsumer.
 boolean isDisposed()
          check if this MessageConsumer is still valid.
 void resetErrorCounter()
          reset the error counter for this MessageConsumer to zero.
 
Methods inherited from interface org.jacorb.notification.interfaces.Disposable
dispose
 

Method Detail

getExecutor

TaskExecutor getExecutor()
Returns:
the TaskExecutor that should be used to push Messages to the connected Consumer.

deliverPendingData

void deliverPendingData()
process pending work. push events to its connected (Push)Consumer.


hasPendingData

boolean hasPendingData()
check if this MessageConsumer has pending work to do. pending work is to push events to its connected (Push)Consumer.


enableDelivery

void enableDelivery()
activate deliveries. this MessageConsumer may invoke remote operations again.


disableDelivery

void disableDelivery()
Disable Deliveries. this MessageConsumer may not invoke remote operations. events are enqueued instead.


deliverMessage

void deliverMessage(Message m)
Deliver a Message to the associated Consumer.


resetErrorCounter

void resetErrorCounter()
reset the error counter for this MessageConsumer to zero.


getErrorCounter

int getErrorCounter()
access the current error count for this MessageConsumer.


incErrorCounter

int incErrorCounter()
increment the current error count by one for this MessageConsumer.


getErrorThreshold

int getErrorThreshold()
access the error threshold for this MessageConsumer. if the error count exeeds the threshold the MessageConsumer will be disconnected.


isDisposed

boolean isDisposed()
check if this MessageConsumer is still valid.