org.jacorb.notification.servant

Class AbstractProxySupplier

Implemented Interfaces:
Configurable, Disposable, FilterAdminOperations, FilterStage, ManageableServant, MessageConsumer, NotifySubscribeOperations, QoSAdminOperations
Known Direct Subclasses:
ProxyPullSupplierImpl, ProxyPushSupplierImpl, StructuredProxyPullSupplierImpl, StructuredProxyPushSupplierImpl

public abstract class AbstractProxySupplier
extends AbstractProxy
implements MessageConsumer, NotifySubscribeOperations

Abstract base class for ProxySuppliers. This class provides following logic for the different ProxySuppliers:

Version:
$Id: AbstractProxySupplier.java,v 1.9 2004/05/06 12:39:59 nicolas Exp $

Author:
Alphonse Bendt

Field Summary

protected Runnable
scheduleDeliverPendingMessagesOperation_
Check if there are pending Messages and deliver them to the Consumer.

Fields inherited from class org.jacorb.notification.servant.AbstractProxy

admin_, channelContext_, id_, isIDPublic_, lifetimeFilter_, logger_, offerManager_, priorityFilter_, qosSettings_, subscriptionManager_, thisServant_

Constructor Summary

AbstractProxySupplier(AbstractAdmin admin, ChannelContext channelContext)

Method Summary

ConsumerAdmin
MyAdmin()
void
configure(Configuration conf)
protected void
connectClient(Object client)
void
disableDelivery()
void
dispose()
void
enableDelivery()
protected void
enqueue(Message message)
put a Message in the queue of pending Messages.
protected Message[]
getAllMessages()
protected Message[]
getAtLeastMessages(int min)
int
getErrorThreshold()
TaskExecutor
getExecutor()
protected Message
getMessageBlocking()
protected Message
getMessageNoBlock()
int
getPendingMessagesCount()
protected Message[]
getUpToMessages(int max)
protected void
handleFailedPushOperation(PushOperation operation, Throwable error)
boolean
hasPendingData()
protected boolean
isEnabled()
boolean
isPushSupplier()
EventType[]
obtain_offered_types(ObtainInfoMode obtainInfoMode)
void
preActivate()
void
setTaskExecutor(TaskExecutor executor)
void
setTaskExecutor(TaskExecutor executor, Disposable disposeTaskExecutor)
void
subscription_change(EventType added, EventType removed)

Methods inherited from class org.jacorb.notification.servant.AbstractProxy

MyType, _default_POA, add_filter, assertConnected, assertNotConnected, checkStillConnected, configure, connectClient, connectionResumed, connectionSuspended, deactivate, disconnectClient, dispose, getErrorCounter, getFilters, getID, getLifetimeFilter, getORB, getPOA, getPriorityFilter, getTaskProcessor, get_all_filters, get_filter, get_qos, handleDisconnected, hasInterFilterGroupOperatorOR, hasLifetimeFilter, hasPriorityFilter, incErrorCounter, isConnected, isDisposed, isIDPublic, isSuspended, lifetime_filter, lifetime_filter, preActivate, priority_filter, priority_filter, remove_all_filters, remove_filter, resetErrorCounter, resume_connection, setDisposeHook, setID, setORB, setOfferManager, setPOA, setSubscriptionManager, setTaskProcessor, set_qos, suspend_connection, validate_event_qos, validate_qos

Field Details

scheduleDeliverPendingMessagesOperation_

protected Runnable scheduleDeliverPendingMessagesOperation_
Check if there are pending Messages and deliver them to the Consumer. the operation is not executed immediately. instead it is scheduled to the Push Thread Pool. only initialized for ProxyPushSuppliers.

Constructor Details

AbstractProxySupplier

protected AbstractProxySupplier(AbstractAdmin admin,
                                ChannelContext channelContext)

Method Details

MyAdmin

public final ConsumerAdmin MyAdmin()


configure

public void configure(Configuration conf)
Overrides:
configure in interface AbstractProxy


connectClient

protected void connectClient(Object client)
Overrides:
connectClient in interface AbstractProxy


disableDelivery

public void disableDelivery()
Specified by:
disableDelivery in interface MessageConsumer


dispose

public final void dispose()
Specified by:
dispose in interface Disposable
Overrides:
dispose in interface AbstractProxy


enableDelivery

public void enableDelivery()
Specified by:
enableDelivery in interface MessageConsumer


enqueue

protected void enqueue(Message message)
put a Message in the queue of pending Messages.

Parameters:
message - the Message to queue.


getAllMessages

protected Message[] getAllMessages()


getAtLeastMessages

protected Message[] getAtLeastMessages(int min)


getErrorThreshold

public int getErrorThreshold()
Specified by:
getErrorThreshold in interface MessageConsumer


getExecutor

public TaskExecutor getExecutor()
Specified by:
getExecutor in interface MessageConsumer


getMessageBlocking

protected Message getMessageBlocking()
            throws InterruptedException


getMessageNoBlock

protected Message getMessageNoBlock()


getPendingMessagesCount

public int getPendingMessagesCount()


getUpToMessages

protected Message[] getUpToMessages(int max)


handleFailedPushOperation

protected void handleFailedPushOperation(PushOperation operation,
                                         Throwable error)


hasPendingData

public boolean hasPendingData()
Specified by:
hasPendingData in interface MessageConsumer


isEnabled

protected boolean isEnabled()


isPushSupplier

public boolean isPushSupplier()


obtain_offered_types

public final EventType[] obtain_offered_types(ObtainInfoMode obtainInfoMode)


preActivate

public void preActivate()
            throws UnsupportedQoS
Specified by:
preActivate in interface ManageableServant
Overrides:
preActivate in interface AbstractProxy


setTaskExecutor

public void setTaskExecutor(TaskExecutor executor)


setTaskExecutor

public void setTaskExecutor(TaskExecutor executor,
                            Disposable disposeTaskExecutor)


subscription_change

public final void subscription_change(EventType added,
                                      EventType removed)
            throws InvalidEventType