org.jacorb.notification.servant
Class AbstractProxy

java.lang.Object
  extended byorg.jacorb.notification.servant.AbstractProxy
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, Disposable, FilterAdminOperations, FilterStage, 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.9 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Field Summary
protected  AbstractAdmin admin_
           
protected  ChannelContext channelContext_
           
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_
           
 
Method Summary
 POA _default_POA()
          Override this method from the Servant baseclass.
 int add_filter(Filter filter)
           
protected  void assertConnected()
           
protected  void assertNotConnected()
           
protected  void checkStillConnected()
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
protected  void connectClient(Object client)
           
protected  void connectionResumed()
          invoked when resume_connection was called successfully.
protected  void connectionSuspended()
           
 void deactivate()
           
protected abstract  void disconnectClient()
          invoke the proxy specific disconnect method.
 void dispose()
          Dispose this Object.
 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  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()
           
 void preActivate()
           
 MappingFilter priority_filter()
           
 void priority_filter(MappingFilter filter)
           
 void remove_all_filters()
           
 void remove_filter(int n)
           
 void resetErrorCounter()
           
 void resume_connection()
           
 void set_qos(Property[] qosProps)
           
 void setDisposeHook(java.lang.Runnable hook)
           
 void setID(java.lang.Integer id, boolean isIDPublic)
           
 void setOfferManager(OfferManager m)
           
 void setORB(ORB orb)
           
 void setPOA(POA poa)
           
 void setSubscriptionManager(SubscriptionManager m)
           
 void setTaskProcessor(TaskProcessor tp)
           
 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, getSubsequentFilterStages, hasMessageConsumer
 
Methods inherited from interface org.jacorb.notification.servant.ManageableServant
activate
 

Field Detail

isIDPublic_

protected boolean isIDPublic_

logger_

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

qosSettings_

protected QoSPropertySet qosSettings_

id_

protected java.lang.Integer id_

admin_

protected AbstractAdmin admin_

offerManager_

protected OfferManager offerManager_

subscriptionManager_

protected SubscriptionManager subscriptionManager_

thisServant_

protected Servant thisServant_

lifetimeFilter_

protected MappingFilter lifetimeFilter_

priorityFilter_

protected MappingFilter priorityFilter_

channelContext_

protected ChannelContext channelContext_
Method Detail

configure

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

setOfferManager

public void setOfferManager(OfferManager m)

setSubscriptionManager

public void setSubscriptionManager(SubscriptionManager m)

setDisposeHook

public void setDisposeHook(java.lang.Runnable hook)

setID

public void setID(java.lang.Integer id,
                  boolean isIDPublic)

isIDPublic

public boolean isIDPublic()

setPOA

public void setPOA(POA poa)
Specified by:
setPOA in interface ManageableServant

getPOA

protected POA getPOA()

setORB

public void setORB(ORB orb)
Specified by:
setORB in interface ManageableServant

getORB

protected ORB getORB()

setTaskProcessor

public void setTaskProcessor(TaskProcessor tp)

getTaskProcessor

protected TaskProcessor getTaskProcessor()

add_filter

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

remove_filter

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

get_filter

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

get_all_filters

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

remove_all_filters

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

validate_event_qos

public void validate_event_qos(Property[] qosProps,
                               NamedPropertyRangeSeqHolder propSeqHolder)
                        throws UnsupportedQoS
Throws:
UnsupportedQoS

validate_qos

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

set_qos

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

get_qos

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

priority_filter

public void priority_filter(MappingFilter filter)

priority_filter

public MappingFilter priority_filter()

lifetime_filter

public MappingFilter lifetime_filter()

lifetime_filter

public void lifetime_filter(MappingFilter filter)

getID

public 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 java.util.List getFilters()
Description copied from interface: FilterStage
get Filters associated to this FilterStage.

Specified by:
getFilters in interface FilterStage

deactivate

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

isDisposed

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

Specified by:
isDisposed in interface FilterStage

dispose

public void dispose()
Description copied from interface: Disposable
Dispose this Object. Free all associated Ressources allocated by this Object. The Object may not be used after a call to dispose.

Specified by:
dispose in interface Disposable

MyType

public abstract ProxyType MyType()

hasInterFilterGroupOperatorOR

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

Specified by:
hasInterFilterGroupOperatorOR in interface FilterStage

isConnected

public boolean isConnected()

hasLifetimeFilter

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

Specified by:
hasLifetimeFilter in interface FilterStage

hasPriorityFilter

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

Specified by:
hasPriorityFilter in interface FilterStage

getLifetimeFilter

public 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 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 int getErrorCounter()

incErrorCounter

public int incErrorCounter()

isSuspended

protected boolean isSuspended()

suspend_connection

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

connectionSuspended

protected void connectionSuspended()

resume_connection

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

connectionResumed

protected void connectionResumed()
invoked when resume_connection was called successfully.


assertConnected

protected void assertConnected()
                        throws NotConnected
Throws:
NotConnected

assertNotConnected

protected void assertNotConnected()
                           throws AlreadyConnected
Throws:
AlreadyConnected

checkStillConnected

protected void checkStillConnected()
                            throws Disconnected
Throws:
Disconnected

connectClient

protected void connectClient(Object client)

preActivate

public void preActivate()
                 throws java.lang.Exception
Specified by:
preActivate in interface ManageableServant
Throws:
java.lang.Exception

disconnectClient

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


handleDisconnected

protected void handleDisconnected(Disconnected e)