org.jacorb.notification.servant
Class AbstractAdmin

java.lang.Object
  extended byorg.jacorb.notification.servant.AbstractAdmin
All Implemented Interfaces:
org.picocontainer.Disposable, Disposable, FilterAdminOperations, FilterStage, FilterStageSource, IServantLifecyle, JMXManageable, NotifyingDisposable, QoSAdminOperations
Direct Known Subclasses:
AbstractSupplierAdmin, ConsumerAdminImpl

public abstract class AbstractAdmin
extends java.lang.Object
implements QoSAdminOperations, FilterAdminOperations, FilterStage, IServantLifecyle, JMXManageable

Abstract Baseclass for Adminobjects.

Version:
$Id: AbstractAdmin.java,v 1.22 2006/03/03 21:07:04 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.picocontainer.MutablePicoContainer container_
           
protected static InterFilterGroupOperator DEFAULT_FILTER_GROUP_OPERATOR
          the default InterFilterGroupOperator used.
protected  org.apache.avalon.framework.logger.Logger logger_
           
protected  java.lang.Object modifyProxiesLock_
           
protected  OfferManager offerManager_
           
protected  java.util.Map pullServants_
           
protected  java.util.Map pushServants_
           
protected  ServantLifecyleControl servantLifecycle_
           
protected  SubscriptionManager subscriptionManager_
           
 
Constructor Summary
protected AbstractAdmin(IEventChannel channel, ORB orb, POA poa, org.apache.avalon.framework.configuration.Configuration config, MessageFactory messageFactory, OfferManager offerManager, SubscriptionManager subscriptionManager)
           
 
Method Summary
 Object activate()
           
 int add_filter(Filter aFilter)
           
 void addProxyEventListener(ProxyEventListener l)
           
protected  void addProxyToMap(AbstractProxy proxy, java.util.Map map, java.lang.Object lock)
           
protected  void configureInterFilterGroupOperator(AbstractProxy proxy)
          configure the InterFilterGroupOperator a proxy should use.
protected  void configureQoS(AbstractProxy proxy)
          configure initial QoS Settings for a proxy.
 void deactivate()
           
 void destroy()
           
 void dispose()
           
protected  void fireCreateProxyRequestEvent()
           
 int[] get_all_filters()
           
protected  int[] get_all_notify_proxies(java.util.Map map, java.lang.Object lock)
          return the ID's for all NotifyStyle proxies stored in the provided Map.
 Filter get_filter(int aFilterId)
           
 Property[] get_qos()
           
 int getChannelID()
           
 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()
          admin does not have a lifetime filter
 java.lang.String getMBeanName()
           
protected abstract  java.lang.String getMBeanType()
           
protected  MessageFactory getMessageFactory()
           
protected  ORB getORB()
           
 POA getPOA()
           
 MappingFilter getPriorityFilter()
          admin does not have a priority filter
protected  AbstractProxy getProxy(int id)
          fetch the proxy specified by the provided id. this method will not access an event style proxy.
 boolean hasInterFilterGroupOperatorOR()
          check if this FilterStage has OR Semantic enabled.
 boolean hasLifetimeFilter()
          admin does never have a lifetime filter
 boolean hasPriorityFilter()
          admin does never have a priority filter
 boolean isDestroyed()
          check if this FilterStage has been disposed.
 EventChannel MyChannel()
           
 int MyID()
           
 InterFilterGroupOperator MyOperator()
           
protected  org.picocontainer.MutablePicoContainer newContainerForEventStyleProxy()
           
protected  org.picocontainer.MutablePicoContainer newContainerForNotifyStyleProxy()
           
protected  org.picocontainer.MutablePicoContainer newContainerForTypedProxy(java.lang.String supportedInterface)
           
 void registerDisposable(Disposable disposable)
          the hooks registered by this method will be run when dispose is called.
 void remove_all_filters()
           
 void remove_filter(int aFilterId)
           
 void removeProxyEventListener(ProxyEventListener listener)
           
protected  void sendNotification(java.lang.String type, java.lang.String message)
           
 void set_qos(Property[] props)
           
 void setInterFilterGroupOperator(InterFilterGroupOperator operator)
           
 void setJMXCallback(JMXManageable.JMXCallback callback)
           
 void validate_qos(Property[] props, NamedPropertyRangeSeqHolder propertyRangeSeqHolder)
           
 
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

DEFAULT_FILTER_GROUP_OPERATOR

protected static final InterFilterGroupOperator DEFAULT_FILTER_GROUP_OPERATOR
the default InterFilterGroupOperator used.


container_

protected final org.picocontainer.MutablePicoContainer container_

offerManager_

protected final OfferManager offerManager_

subscriptionManager_

protected final SubscriptionManager subscriptionManager_

logger_

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

modifyProxiesLock_

protected final java.lang.Object modifyProxiesLock_

pullServants_

protected final java.util.Map pullServants_

pushServants_

protected final java.util.Map pushServants_

servantLifecycle_

protected final ServantLifecyleControl servantLifecycle_
Constructor Detail

AbstractAdmin

protected AbstractAdmin(IEventChannel channel,
                        ORB orb,
                        POA poa,
                        org.apache.avalon.framework.configuration.Configuration config,
                        MessageFactory messageFactory,
                        OfferManager offerManager,
                        SubscriptionManager subscriptionManager)
Method Detail

registerDisposable

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

Specified by:
registerDisposable in interface NotifyingDisposable

setInterFilterGroupOperator

public void setInterFilterGroupOperator(InterFilterGroupOperator operator)

getPOA

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

getORB

protected ORB getORB()

getMessageFactory

protected MessageFactory getMessageFactory()

getFilters

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

Specified by:
getFilters in interface FilterStage

add_filter

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

remove_filter

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

get_filter

public Filter get_filter(int aFilterId)
                  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

MyOperator

public final InterFilterGroupOperator MyOperator()

MyChannel

public final EventChannel MyChannel()

MyID

public final int MyID()

getChannelID

public final int getChannelID()

get_qos

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

set_qos

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

validate_qos

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

destroy

public final void destroy()

dispose

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

activate

public final Object activate()

deactivate

public final void deactivate()

getID

public java.lang.Integer getID()

isDestroyed

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

Specified by:
isDestroyed in interface FilterStage

fireCreateProxyRequestEvent

protected void fireCreateProxyRequestEvent()
                                    throws AdminLimitExceeded
Throws:
AdminLimitExceeded

hasLifetimeFilter

public boolean hasLifetimeFilter()
admin does never have a lifetime filter

Specified by:
hasLifetimeFilter in interface FilterStage

hasPriorityFilter

public boolean hasPriorityFilter()
admin does never have a priority filter

Specified by:
hasPriorityFilter in interface FilterStage

getLifetimeFilter

public MappingFilter getLifetimeFilter()
admin does not have a lifetime filter

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

getPriorityFilter

public MappingFilter getPriorityFilter()
admin does not have a priority filter

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

getInterFilterGroupOperator

public java.lang.String getInterFilterGroupOperator()

hasInterFilterGroupOperatorOR

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

Specified by:
hasInterFilterGroupOperatorOR in interface FilterStage

getProxy

protected AbstractProxy getProxy(int id)
                          throws ProxyNotFound
fetch the proxy specified by the provided id. this method will not access an event style proxy.

Throws:
ProxyNotFound

get_all_notify_proxies

protected int[] get_all_notify_proxies(java.util.Map map,
                                       java.lang.Object lock)
return the ID's for all NotifyStyle proxies stored in the provided Map.


configureQoS

protected void configureQoS(AbstractProxy proxy)
                     throws UnsupportedQoS
configure initial QoS Settings for a proxy.

Throws:
UnsupportedQoS

configureInterFilterGroupOperator

protected void configureInterFilterGroupOperator(AbstractProxy proxy)
configure the InterFilterGroupOperator a proxy should use.


addProxyEventListener

public void addProxyEventListener(ProxyEventListener l)

removeProxyEventListener

public void removeProxyEventListener(ProxyEventListener listener)

addProxyToMap

protected void addProxyToMap(AbstractProxy proxy,
                             java.util.Map map,
                             java.lang.Object lock)

newContainerForNotifyStyleProxy

protected org.picocontainer.MutablePicoContainer newContainerForNotifyStyleProxy()

newContainerForEventStyleProxy

protected org.picocontainer.MutablePicoContainer newContainerForEventStyleProxy()

newContainerForTypedProxy

protected org.picocontainer.MutablePicoContainer newContainerForTypedProxy(java.lang.String supportedInterface)

getJMXObjectName

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

getMBeanName

public final java.lang.String getMBeanName()

getMBeanType

protected abstract java.lang.String getMBeanType()

getJMXNotificationTypes

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

setJMXCallback

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

sendNotification

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