org.jacorb.notification.servant
Class SequenceProxyPushSupplierImpl

java.lang.Object
  extended by org.jacorb.notification.servant.AbstractProxy
      extended by org.jacorb.notification.servant.AbstractProxySupplier
          extended by org.jacorb.notification.servant.StructuredProxyPushSupplierImpl
              extended by org.jacorb.notification.servant.SequenceProxyPushSupplierImpl
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, Disposable, FilterStage, MessageConsumer, ManageableServant, QoSAdminOperations, ProxySupplierOperations, SequenceProxyPushSupplierOperations, StructuredProxyPushSupplierOperations, NotifySubscribeOperations, SequencePushSupplierOperations, StructuredPushSupplierOperations, FilterAdminOperations

public class SequenceProxyPushSupplierImpl
extends StructuredProxyPushSupplierImpl
implements SequenceProxyPushSupplierOperations

Version:
$Id: SequenceProxyPushSupplierImpl.java,v 1.8 2004/05/06 12:40:00 nicolas Exp $
Author:
Alphonse Bendt

Field Summary
 
Fields inherited from class org.jacorb.notification.servant.AbstractProxySupplier
scheduleDeliverPendingMessagesOperation_
 
Fields inherited from class org.jacorb.notification.servant.AbstractProxy
admin_, channelContext_, id_, isIDPublic_, lifetimeFilter_, logger_, offerManager_, priorityFilter_, qosSettings_, subscriptionManager_, thisServant_
 
Constructor Summary
SequenceProxyPushSupplierImpl(AbstractAdmin myAdminServant, ChannelContext channelContext)
          this callback is called by the TimerDaemon.
 
Method Summary
 void connect_sequence_push_consumer(SequencePushConsumer consumer)
           
protected  void connectionResumed()
          invoked when resume_connection was called successfully.
protected  void connectionSuspended()
           
 void deliverMessage(Message event)
          TODO check error handling when push fails
 void deliverPendingData()
          overrides the superclass version.
 void disconnect_sequence_push_supplier()
           
protected  void disconnectClient()
          invoke the proxy specific disconnect method.
 Servant getServant()
           
 ProxyType MyType()
           
 void preActivate()
           
 
Methods inherited from class org.jacorb.notification.servant.StructuredProxyPushSupplierImpl
activate, connect_structured_push_consumer, disconnect_structured_push_supplier, getMessageConsumer, getSubsequentFilterStages, hasMessageConsumer
 
Methods inherited from class org.jacorb.notification.servant.AbstractProxySupplier
configure, connectClient, disableDelivery, dispose, enableDelivery, enqueue, getAllMessages, getAtLeastMessages, getErrorThreshold, getExecutor, getMessageBlocking, getMessageNoBlock, getPendingMessagesCount, getUpToMessages, handleFailedPushOperation, hasPendingData, isEnabled, isPushSupplier, MyAdmin, obtain_offered_types, setTaskExecutor, setTaskExecutor, subscription_change
 
Methods inherited from class org.jacorb.notification.servant.AbstractProxy
_default_POA, add_filter, assertConnected, assertNotConnected, checkStillConnected, deactivate, get_all_filters, get_filter, get_qos, getErrorCounter, getFilters, getID, getLifetimeFilter, getORB, getPOA, getPriorityFilter, getTaskProcessor, handleDisconnected, hasInterFilterGroupOperatorOR, hasLifetimeFilter, hasPriorityFilter, incErrorCounter, isConnected, isDisposed, isIDPublic, isSuspended, lifetime_filter, lifetime_filter, priority_filter, priority_filter, remove_all_filters, remove_filter, resetErrorCounter, resume_connection, set_qos, setDisposeHook, setID, setOfferManager, setORB, setPOA, setSubscriptionManager, setTaskProcessor, suspend_connection, validate_event_qos, validate_qos
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CosNotifyChannelAdmin.SequenceProxyPushSupplierOperations
resume_connection, suspend_connection
 
Methods inherited from interface org.omg.CosNotifyChannelAdmin.ProxySupplierOperations
lifetime_filter, lifetime_filter, MyAdmin, obtain_offered_types, priority_filter, priority_filter, validate_event_qos
 
Methods inherited from interface org.omg.CosNotification.QoSAdminOperations
get_qos, set_qos, validate_qos
 
Methods inherited from interface org.omg.CosNotifyFilter.FilterAdminOperations
add_filter, get_all_filters, get_filter, remove_all_filters, remove_filter
 
Methods inherited from interface org.omg.CosNotifyComm.NotifySubscribeOperations
subscription_change
 
Methods inherited from interface org.omg.CosNotifyChannelAdmin.StructuredProxyPushSupplierOperations
resume_connection, suspend_connection
 
Methods inherited from interface org.jacorb.notification.interfaces.MessageConsumer
getErrorCounter, incErrorCounter, isDisposed, resetErrorCounter
 

Constructor Detail

SequenceProxyPushSupplierImpl

public SequenceProxyPushSupplierImpl(AbstractAdmin myAdminServant,
                                     ChannelContext channelContext)
this callback is called by the TimerDaemon. Check if there are pending Events and deliver them to the Consumer. As there's only one TimerDaemon its important to block the daemon only a minimal amount of time. Therefor the Callback does not do the actual delivery. Instead a DeliverTask is scheduled for this Supplier.

Method Detail

MyType

public ProxyType MyType()
Specified by:
MyType in interface ProxySupplierOperations
Overrides:
MyType in class StructuredProxyPushSupplierImpl

preActivate

public void preActivate()
                 throws UnsupportedQoS
Specified by:
preActivate in interface ManageableServant
Overrides:
preActivate in class AbstractProxySupplier
Throws:
UnsupportedQoS

deliverMessage

public void deliverMessage(Message event)
Description copied from class: StructuredProxyPushSupplierImpl
TODO check error handling when push fails

Specified by:
deliverMessage in interface MessageConsumer
Overrides:
deliverMessage in class StructuredProxyPushSupplierImpl

deliverPendingData

public void deliverPendingData()
overrides the superclass version.

Specified by:
deliverPendingData in interface MessageConsumer
Overrides:
deliverPendingData in class StructuredProxyPushSupplierImpl

connect_sequence_push_consumer

public void connect_sequence_push_consumer(SequencePushConsumer consumer)
                                    throws AlreadyConnected,
                                           TypeError
Specified by:
connect_sequence_push_consumer in interface SequenceProxyPushSupplierOperations
Throws:
AlreadyConnected
TypeError

connectionResumed

protected void connectionResumed()
Description copied from class: AbstractProxy
invoked when resume_connection was called successfully.

Overrides:
connectionResumed in class StructuredProxyPushSupplierImpl

connectionSuspended

protected void connectionSuspended()
Overrides:
connectionSuspended in class AbstractProxy

disconnect_sequence_push_supplier

public void disconnect_sequence_push_supplier()
Specified by:
disconnect_sequence_push_supplier in interface SequencePushSupplierOperations

disconnectClient

protected void disconnectClient()
Description copied from class: AbstractProxy
invoke the proxy specific disconnect method.

Overrides:
disconnectClient in class StructuredProxyPushSupplierImpl

getServant

public Servant getServant()
Overrides:
getServant in class StructuredProxyPushSupplierImpl