org.jacorb.notification.servant
Class AbstractProxy

java.lang.Object
  extended byorg.jacorb.notification.servant.AbstractProxy
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.picocontainer.Disposable, Disposable, FilterAdminOperations, FilterStage, FilterStageSource, ManageableServant, QoSAdminOperations
Direct Known Subclasses:
org.jacorb.notification.servant.AbstractProxyConsumer, AbstractProxySupplier

public abstract class AbstractProxy
extends java.lang.Object
implements FilterAdminOperations, QoSAdminOperations, FilterStage, Disposable, ManageableServant, org.apache.avalon.framework.configuration.Configurable

Version:
$Id: AbstractProxy.java,v 1.19 2005/05/01 21:00:58 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
protected  java.lang.Integer id_
           
protected  boolean isIDPublic_
           
protected  MappingFilter lifetimeFilter_
           
protected  org.apache.avalon.framework.logger.Logger logger_
           
protected  OfferManager offerManager_
           
protected  MappingFilter priorityFilter_
           
protected  QoSPropertySet qosSettings_
           
protected  SubscriptionManager subscriptionManager_
           
protected  Servant thisServant_
           
 
Constructor Summary
protected AbstractProxy(IAdmin admin, ORB orb, POA poa, org.apache.avalon.framework.configuration.Configuration conf, TaskProcessor taskProcessor, OfferManager offerManager, SubscriptionManager subscriptionManager)
           
 
Method Summary
 POA _default_POA()
          Override this method from the Servant baseclass.
 int add_filter(Filter filter)
           
 void addDisposeHook(Disposable d)
           
protected  void checkDestroyStatus()
           
protected  void checkIsConnected()
           
protected  void checkIsNotConnected()
           
protected  void checkStillConnected()
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
protected  void connectClient(Object client)
           
protected  void connectionResumed()
          this is an extension point.
protected  void connectionSuspended()
          this is an extension point.
 void deactivate()
           
 void destroy()
           
protected abstract  void disconnectClient()
          invoke the proxy specific disconnect method.
 void dispose()
           
 int[] get_all_filters()
           
 Filter get_filter(int n)
           
 Property[] get_qos()
           
 int getErrorCounter()
           
 java.util.List getFilters()
          get Filters associated to this FilterStage.
 java.lang.Integer getID()
           
 MappingFilter getLifetimeFilter()
          access the LifetimeFilter attached to this FilterStage
protected  ORB getORB()
           
protected  POA getPOA()
           
 MappingFilter getPriorityFilter()
          access the PriorityFilter attached to this FilterStage
protected abstract  Servant getServant()
           
protected  TaskProcessor getTaskProcessor()
           
protected  void handleDisconnected(Disconnected e)
           
 boolean hasInterFilterGroupOperatorOR()
          check if this FilterStage has OR Semantic enabled.
 boolean hasLifetimeFilter()
          check if this FilterStage has a LifetimeFilter attached
 boolean hasPriorityFilter()
          check if this FilterStage has a PriorityFilter attached
 int incErrorCounter()
           
 boolean isConnected()
           
 boolean isDisposed()
          check if this FilterStage has been disposed.
 boolean isIDPublic()
           
protected  boolean isSuspended()
           
 MappingFilter lifetime_filter()
           
 void lifetime_filter(MappingFilter filter)
           
abstract  ProxyType MyType()
           
 MappingFilter priority_filter()
           
 void priority_filter(MappingFilter filter)
           
 void remove_all_filters()
           
 void remove_filter(int n)
           
protected abstract  void removeListener()
           
 void resetErrorCounter()
           
 void resume_connection()
           
 void set_qos(Property[] qosProps)
           
 void suspend_connection()
           
 void validate_event_qos(Property[] qosProps, NamedPropertyRangeSeqHolder propSeqHolder)
           
 void validate_qos(Property[] props, NamedPropertyRangeSeqHolder propertyRange)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jacorb.notification.interfaces.FilterStage
getMessageConsumer, hasMessageConsumer
 
Methods inherited from interface org.jacorb.notification.interfaces.FilterStageSource
getSubsequentFilterStages
 
Methods inherited from interface org.jacorb.notification.servant.ManageableServant
activate
 

Field Detail

isIDPublic_

protected final boolean isIDPublic_

logger_

protected final org.apache.avalon.framework.logger.Logger logger_

qosSettings_

protected final QoSPropertySet qosSettings_

id_

protected final java.lang.Integer id_

offerManager_

protected final OfferManager offerManager_

subscriptionManager_

protected final SubscriptionManager subscriptionManager_

thisServant_

protected Servant thisServant_

lifetimeFilter_

protected MappingFilter lifetimeFilter_

priorityFilter_

protected MappingFilter priorityFilter_
Constructor Detail

AbstractProxy

protected AbstractProxy(IAdmin admin,
                        ORB orb,
                        POA poa,
                        org.apache.avalon.framework.configuration.Configuration conf,
                        TaskProcessor taskProcessor,
                        OfferManager offerManager,
                        SubscriptionManager subscriptionManager)
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable

addDisposeHook

public void addDisposeHook(Disposable d)

isIDPublic

public boolean isIDPublic()

getPOA

protected POA getPOA()

getORB

protected ORB getORB()

getTaskProcessor

protected TaskProcessor getTaskProcessor()

add_filter

public final int add_filter(Filter filter)
Specified by:
add_filter in interface FilterAdminOperations

remove_filter

public final void remove_filter(int n)
                         throws FilterNotFound
Specified by:
remove_filter in interface FilterAdminOperations
Throws:
FilterNotFound

get_filter

public final Filter get_filter(int n)
                        throws FilterNotFound
Specified by:
get_filter in interface FilterAdminOperations
Throws:
FilterNotFound

get_all_filters

public final int[] get_all_filters()
Specified by:
get_all_filters in interface FilterAdminOperations

remove_all_filters

public final void remove_all_filters()
Specified by:
remove_all_filters in interface FilterAdminOperations

validate_event_qos

public void validate_event_qos(Property[] qosProps,
                               NamedPropertyRangeSeqHolder propSeqHolder)

validate_qos

public final void validate_qos(Property[] props,
                               NamedPropertyRangeSeqHolder propertyRange)
                        throws UnsupportedQoS
Specified by:
validate_qos in interface QoSAdminOperations
Throws:
UnsupportedQoS

set_qos

public final void set_qos(Property[] qosProps)
                   throws UnsupportedQoS
Specified by:
set_qos in interface QoSAdminOperations
Throws:
UnsupportedQoS

get_qos

public final Property[] get_qos()
Specified by:
get_qos in interface QoSAdminOperations

priority_filter

public final void priority_filter(MappingFilter filter)

priority_filter

public final MappingFilter priority_filter()

lifetime_filter

public final MappingFilter lifetime_filter()

lifetime_filter

public final void lifetime_filter(MappingFilter filter)

getID

public final java.lang.Integer getID()

_default_POA

public final POA _default_POA()
Override this method from the Servant baseclass. Fintan Bolton in his book "Pure CORBA" suggests that you override this method to avoid the risk that a servant object (like this one) could be activated by the wrong POA object.


getFilters

public final java.util.List getFilters()
Description copied from interface: FilterStage
get Filters associated to this FilterStage.

Specified by:
getFilters in interface FilterStage

deactivate

public final void deactivate()
Specified by:
deactivate in interface ManageableServant

isDisposed

public final boolean isDisposed()
Description copied from interface: FilterStage
check if this FilterStage has been disposed.

Specified by:
isDisposed in interface FilterStage

checkDestroyStatus

protected void checkDestroyStatus()
                           throws OBJECT_NOT_EXIST
Throws:
OBJECT_NOT_EXIST

destroy

public final void destroy()

dispose

public void dispose()
Specified by:
dispose in interface org.picocontainer.Disposable

MyType

public abstract ProxyType MyType()

hasInterFilterGroupOperatorOR

public final boolean hasInterFilterGroupOperatorOR()
Description copied from interface: FilterStage
check if this FilterStage has OR Semantic enabled.

Specified by:
hasInterFilterGroupOperatorOR in interface FilterStage

isConnected

public final boolean isConnected()

hasLifetimeFilter

public final boolean hasLifetimeFilter()
Description copied from interface: FilterStage
check if this FilterStage has a LifetimeFilter attached

Specified by:
hasLifetimeFilter in interface FilterStage

hasPriorityFilter

public final boolean hasPriorityFilter()
Description copied from interface: FilterStage
check if this FilterStage has a PriorityFilter attached

Specified by:
hasPriorityFilter in interface FilterStage

getLifetimeFilter

public final MappingFilter getLifetimeFilter()
Description copied from interface: FilterStage
access the LifetimeFilter attached to this FilterStage

Specified by:
getLifetimeFilter in interface FilterStage
Returns:
a LifetimeFilter or null if no Filter is attached

getPriorityFilter

public final MappingFilter getPriorityFilter()
Description copied from interface: FilterStage
access the PriorityFilter attached to this FilterStage

Specified by:
getPriorityFilter in interface FilterStage
Returns:
a PriorityFilter or null if no Filter is attached

resetErrorCounter

public void resetErrorCounter()

getErrorCounter

public final int getErrorCounter()

incErrorCounter

public final int incErrorCounter()

isSuspended

protected boolean isSuspended()

suspend_connection

public final void suspend_connection()
                              throws NotConnected,
                                     ConnectionAlreadyInactive
Throws:
NotConnected
ConnectionAlreadyInactive

connectionSuspended

protected void connectionSuspended()
this is an extension point.


resume_connection

public final void resume_connection()
                             throws NotConnected,
                                    ConnectionAlreadyActive
Throws:
NotConnected
ConnectionAlreadyActive

connectionResumed

protected void connectionResumed()
this is an extension point. invoked when resume_connection was called successfully.


checkIsConnected

protected void checkIsConnected()
                         throws NotConnected
Throws:
NotConnected

checkIsNotConnected

protected void checkIsNotConnected()
                            throws AlreadyConnected
Throws:
AlreadyConnected

checkStillConnected

protected void checkStillConnected()
                            throws Disconnected
Throws:
Disconnected

connectClient

protected void connectClient(Object client)

disconnectClient

protected abstract void disconnectClient()
invoke the proxy specific disconnect method.


getServant

protected abstract Servant getServant()

handleDisconnected

protected void handleDisconnected(Disconnected e)

removeListener

protected abstract void removeListener()