org.jacorb.notification.servant
Class TypedProxyPullConsumerImpl

java.lang.Object
  extended byorg.jacorb.notification.servant.AbstractProxy
      extended byorg.jacorb.notification.servant.AbstractProxyConsumer
          extended byorg.jacorb.notification.servant.TypedProxyPullConsumerImpl
All Implemented Interfaces:
AbstractProxyConsumerI, org.apache.avalon.framework.configuration.Configurable, org.picocontainer.Disposable, Disposable, FilterAdminOperations, FilterStage, FilterStageSource, ITypedProxy, ManageableServant, MessageSupplier, NotifyPublishOperations, ProxyConsumerOperations, PullConsumerOperations, PullConsumerOperations, QoSAdminOperations, TypedProxyPullConsumerOperations

public class TypedProxyPullConsumerImpl
extends org.jacorb.notification.servant.AbstractProxyConsumer
implements TypedProxyPullConsumerOperations, MessageSupplier, ITypedProxy

Version:
$Id: TypedProxyPullConsumerImpl.java,v 1.9 2005/05/04 17:32:29 alphonse.bendt Exp $

Field Summary
protected  SupplierAdmin supplierAdmin_
           
 
Fields inherited from class org.jacorb.notification.servant.AbstractProxy
id_, isIDPublic_, lifetimeFilter_, logger_, offerManager_, priorityFilter_, qosSettings_, subscriptionManager_, thisServant_
 
Constructor Summary
TypedProxyPullConsumerImpl(ITypedAdmin admin, SupplierAdmin supplierAdmin, ORB orb, POA poa, org.apache.avalon.framework.configuration.Configuration conf, TaskProcessor taskProcessor, MessageFactory messageFactory, OfferManager offerManager, SubscriptionManager subscriptionManager)
           
 
Method Summary
 Object activate()
           
protected  void checkMessageProperties(Message m)
          check if a Message is acceptable to the QoS Settings of this ProxyConsumer
 void connect_typed_pull_supplier(TypedPullSupplier typedPullSupplier)
           
protected  void connectClient(Object client)
           
 void disconnect_pull_consumer()
           
 void disconnectClient()
          invoke the proxy specific disconnect method.
 FilterStage getFirstStage()
           
 MessageConsumer getMessageConsumer()
          get the associated MessageConsumer or null.
protected  MessageFactory getMessageFactory()
           
 Servant getServant()
           
 java.util.List getSubsequentFilterStages()
           
 boolean hasMessageConsumer()
          check if this FilterStage has a MessageConsumer associcated.
 boolean isStartTimeSupported()
           
 boolean isTimeOutSupported()
           
 SupplierAdmin MyAdmin()
           
 ProxyType MyType()
           
 EventType[] obtain_subscription_types(ObtainInfoMode obtainInfoMode)
           
 void offer_change(EventType[] added, EventType[] removed)
           
protected  void processMessage(Message mesg)
           
protected  void removeListener()
          removes the listener. subscription_change will no more be issued to the connected Supplier
 void runPullMessage()
          the implementation pulls one or more events from its Supplier and hands over the pulled events to the TaskProcessor.
protected  void schedulePullTask(MessageSupplier target)
           
 void setSubsequentDestinations(java.util.List list)
           
 
Methods inherited from class org.jacorb.notification.servant.AbstractProxy
_default_POA, add_filter, addDisposeHook, checkDestroyStatus, checkIsConnected, checkIsNotConnected, checkStillConnected, configure, connectionResumed, connectionSuspended, deactivate, destroy, dispose, 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, 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.CosTypedNotifyChannelAdmin.TypedProxyPullConsumerOperations
resume_connection, suspend_connection
 
Methods inherited from interface org.omg.CosNotifyChannelAdmin.ProxyConsumerOperations
MyAdmin, obtain_subscription_types, 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.NotifyPublishOperations
offer_change
 
Methods inherited from interface org.jacorb.notification.interfaces.MessageSupplier
destroy
 

Field Detail

supplierAdmin_

protected final SupplierAdmin supplierAdmin_
Constructor Detail

TypedProxyPullConsumerImpl

public TypedProxyPullConsumerImpl(ITypedAdmin admin,
                                  SupplierAdmin supplierAdmin,
                                  ORB orb,
                                  POA poa,
                                  org.apache.avalon.framework.configuration.Configuration conf,
                                  TaskProcessor taskProcessor,
                                  MessageFactory messageFactory,
                                  OfferManager offerManager,
                                  SubscriptionManager subscriptionManager)
Method Detail

connect_typed_pull_supplier

public void connect_typed_pull_supplier(TypedPullSupplier typedPullSupplier)
                                 throws AlreadyConnected,
                                        TypeError
Specified by:
connect_typed_pull_supplier in interface TypedProxyPullConsumerOperations
Throws:
AlreadyConnected
TypeError

runPullMessage

public void runPullMessage()
Description copied from interface: MessageSupplier
the implementation pulls one or more events from its Supplier and hands over the pulled events to the TaskProcessor.

Specified by:
runPullMessage in interface MessageSupplier

disconnect_pull_consumer

public void disconnect_pull_consumer()
Specified by:
disconnect_pull_consumer in interface PullConsumerOperations

MyType

public ProxyType MyType()
Specified by:
MyType in interface ProxyConsumerOperations
Specified by:
MyType in class AbstractProxy

activate

public Object activate()
Specified by:
activate in interface ManageableServant

disconnectClient

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

Specified by:
disconnectClient in class AbstractProxy

getServant

public Servant getServant()
Specified by:
getServant in class AbstractProxy

getMessageFactory

protected MessageFactory getMessageFactory()

getSubsequentFilterStages

public final java.util.List getSubsequentFilterStages()
Specified by:
getSubsequentFilterStages in interface FilterStageSource

setSubsequentDestinations

public void setSubsequentDestinations(java.util.List list)

schedulePullTask

protected void schedulePullTask(MessageSupplier target)

checkMessageProperties

protected void checkMessageProperties(Message m)
check if a Message is acceptable to the QoS Settings of this ProxyConsumer


getFirstStage

public FilterStage getFirstStage()
Specified by:
getFirstStage in interface AbstractProxyConsumerI

isTimeOutSupported

public boolean isTimeOutSupported()
Specified by:
isTimeOutSupported in interface AbstractProxyConsumerI

isStartTimeSupported

public boolean isStartTimeSupported()
Specified by:
isStartTimeSupported in interface AbstractProxyConsumerI

MyAdmin

public final SupplierAdmin MyAdmin()

getMessageConsumer

public final MessageConsumer getMessageConsumer()
Description copied from interface: FilterStage
get the associated MessageConsumer or null.

Specified by:
getMessageConsumer in interface FilterStage

hasMessageConsumer

public final boolean hasMessageConsumer()
Description copied from interface: FilterStage
check if this FilterStage has a MessageConsumer associcated.

Specified by:
hasMessageConsumer in interface FilterStage

offer_change

public void offer_change(EventType[] added,
                         EventType[] removed)
                  throws InvalidEventType
Specified by:
offer_change in interface NotifyPublishOperations
Throws:
InvalidEventType

obtain_subscription_types

public final EventType[] obtain_subscription_types(ObtainInfoMode obtainInfoMode)

removeListener

protected void removeListener()
removes the listener. subscription_change will no more be issued to the connected Supplier

Specified by:
removeListener in class AbstractProxy

connectClient

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

processMessage

protected void processMessage(Message mesg)