org.jacorb.notification.servant
Class AbstractProxy

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

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

Version:
$Id: AbstractProxy.java,v 1.31 2006/03/06 19:53:46 alphonse.bendt Exp $
Author:
Alphonse Bendt

Nested Class Summary
 
Nested classes inherited from class org.jacorb.notification.interfaces.JMXManageable
JMXManageable.JMXCallback
 
Field Summary
protected  org.apache.avalon.framework.configuration.Configuration config_
           
protected  java.util.Set eventTypes_
           
protected  org.apache.avalon.framework.logger.Logger logger_
           
protected  OfferManager offerManager_
           
protected  QoSPropertySet qosSettings_
           
protected  SubscriptionManager subscriptionManager_
           
 
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
 Object activate()
           
 int add_filter(Filter filter)
           
protected  void checkDestroyStatus()
           
protected  void checkIsConnected()
           
protected  void checkIsNotConnected()
           
protected  void checkStillConnected()
           
protected abstract  void clientDisconnected()
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
protected  void connectClient(Object client)
           
protected  void connectionResumed()
          this is an extension point. invoked when resume_connection was called successfully.
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()
           
 java.lang.String getClientIOR()
           
 boolean getConnected()
           
 int getErrorCounter()
           
 java.util.List getFilters()
          get Filters associated to this FilterStage.
 java.lang.Integer getID()
           
 java.lang.String getInterFilterGroupOperator()
           
 java.lang.String[] getJMXNotificationTypes()
           
 java.lang.String getJMXObjectName()
           
 MappingFilter getLifetimeFilter()
          access the LifetimeFilter attached to this FilterStage
 java.lang.String getMBeanName()
           
protected  java.lang.String getMBeanType()
           
protected  ORB getORB()
           
 POA getPOA()
           
 MappingFilter getPriorityFilter()
          access the PriorityFilter attached to this FilterStage
 java.lang.String getStatus()
           
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 isDestroyed()
          check if this FilterStage has been disposed.
 boolean isIDPublic()
           
 boolean isSuspended()
           
 MappingFilter lifetime_filter()
           
 void lifetime_filter(MappingFilter filter)
           
abstract  ProxyType MyType()
           
 MappingFilter priority_filter()
           
 void priority_filter(MappingFilter filter)
           
 void registerDisposable(Disposable d)
          the hooks registered by this method will be run when dispose is called.
 void remove_all_filters()
           
 void remove_filter(int n)
           
protected abstract  void removeListener()
           
 void resetErrorCounter()
           
 void resume_connection()
           
protected  void sendNotification(java.lang.String type, java.lang.String message)
           
protected  void sendNotification(java.lang.String type, java.lang.String message, java.lang.Object payload)
           
 void set_qos(Property[] qosProps)
           
 void setJMXCallback(JMXManageable.JMXCallback callback)
           
 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.lifecycle.IServantLifecyle
newServant
 

Field Detail

logger_

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

qosSettings_

protected final QoSPropertySet qosSettings_

offerManager_

protected final OfferManager offerManager_

subscriptionManager_

protected final SubscriptionManager subscriptionManager_

eventTypes_

protected final java.util.Set eventTypes_

config_

protected org.apache.avalon.framework.configuration.Configuration config_
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

registerDisposable

public void registerDisposable(Disposable d)
Description copied from interface: NotifyingDisposable
the hooks registered by this method will be run when dispose is called.

Specified by:
registerDisposable in interface NotifyingDisposable

isIDPublic

public boolean isIDPublic()

getPOA

public final POA getPOA()
Specified by:
getPOA in interface IServantLifecyle

getORB

protected ORB getORB()

activate

public final Object activate()

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()

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()

isDestroyed

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

Specified by:
isDestroyed in interface FilterStage

checkDestroyStatus

protected void checkDestroyStatus()
                           throws OBJECT_NOT_EXIST
Throws:
OBJECT_NOT_EXIST

destroy

public final void destroy()
Specified by:
destroy in interface AbstractProxyMBean

dispose

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

clientDisconnected

protected abstract void clientDisconnected()

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

getConnected

public final boolean getConnected()
Specified by:
getConnected in interface AbstractProxyMBean

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()
Specified by:
resetErrorCounter in interface AbstractProxyMBean

getErrorCounter

public final int getErrorCounter()
Specified by:
getErrorCounter in interface AbstractProxyMBean

incErrorCounter

public final int incErrorCounter()

isSuspended

public 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.


handleDisconnected

protected void handleDisconnected(Disconnected e)

removeListener

protected abstract void removeListener()

getJMXObjectName

public final java.lang.String getJMXObjectName()
Specified by:
getJMXObjectName in interface JMXManageable

getMBeanName

public final java.lang.String getMBeanName()

getMBeanType

protected java.lang.String getMBeanType()

getJMXNotificationTypes

public java.lang.String[] getJMXNotificationTypes()
Specified by:
getJMXNotificationTypes in interface JMXManageable

setJMXCallback

public void setJMXCallback(JMXManageable.JMXCallback callback)
Specified by:
setJMXCallback in interface JMXManageable

sendNotification

protected void sendNotification(java.lang.String type,
                                java.lang.String message)

sendNotification

protected void sendNotification(java.lang.String type,
                                java.lang.String message,
                                java.lang.Object payload)

getStatus

public java.lang.String getStatus()
Specified by:
getStatus in interface AbstractProxyMBean

getClientIOR

public java.lang.String getClientIOR()
Specified by:
getClientIOR in interface AbstractProxyMBean

getInterFilterGroupOperator

public java.lang.String getInterFilterGroupOperator()
Specified by:
getInterFilterGroupOperator in interface AbstractProxyMBean