org.jacorb.notification.servant
Class AbstractAdmin

java.lang.Object
  extended by org.jacorb.notification.servant.AbstractAdmin
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, FilterStage, ManageableServant, QoSAdminOperations, FilterAdminOperations
Direct Known Subclasses:
ConsumerAdminTieImpl, SupplierAdminTieImpl

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

Abstract Baseclass for Adminobjects.

Version:
$Id: AbstractAdmin.java,v 1.8 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Field Summary
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  SubscriptionManager subscriptionManager_
           
 
Constructor Summary
protected AbstractAdmin()
           
protected AbstractAdmin(ChannelContext channelContext)
           
 
Method Summary
 POA _default_POA()
           
 int add_filter(Filter aFilter)
           
 void addProxyEventListener(ProxyEventListener l)
           
protected  void addProxyToMap(AbstractProxy proxy, java.util.Map map, java.lang.Object lock)
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
protected  void configureEventStyleID(AbstractProxy proxy)
          configure a event style proxy. the key is only for internal use. especially the key cannot used to fetch the proxy via get_proxy_consumer or get_proxy_supplier.
protected  void configureInterFilterGroupOperator(AbstractProxy proxy)
          configure the InterFilterGroupOperator a proxy should use.
protected  void configureManagers(AbstractProxy proxy)
          configure OfferManager and SubscriptionManager for a proxy.
protected  void configureNotifyStyleID(AbstractProxy proxy)
          configure the ID for a notify style proxy. the id is public. the proxy can be accessed via a call to get_proxy_consumer or get_proxy_supplier.
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()
           
 ChannelContext getChannelContext()
           
protected  EventChannelImpl getChannelServant()
           
 java.util.List getFilters()
          get Filters associated to this FilterStage.
 java.lang.Integer getID()
           
 MappingFilter getLifetimeFilter()
          admin does not have a lifetime filter
protected  MessageFactory getMessageFactory()
           
protected  ORB getORB()
           
protected  POA getPOA()
           
 MappingFilter getPriorityFilter()
          admin does not have a priority filter
 java.util.List getProxies()
           
protected  AbstractProxy getProxy(int id)
          fetch the proxy specified by the provided id. this method will not access an event style proxy.
abstract  Servant getServant()
           
 boolean hasInterFilterGroupOperatorOR()
          check if this FilterStage has OR Semantic enabled.
 boolean hasLifetimeFilter()
          admin does not have a lifetime filter
 boolean hasPriorityFilter()
          admin does not have a priority filter
 boolean isDisposed()
          check if this FilterStage has been disposed.
 EventChannel MyChannel()
           
 int MyID()
           
 InterFilterGroupOperator MyOperator()
           
 void preActivate()
          satisfy method implementation
 void remove_all_filters()
           
 void remove_filter(int aFilterId)
           
 void removeProxyEventListener(ProxyEventListener listener)
           
 void set_qos(Property[] props)
           
 void setDisposeHook(java.lang.Runnable disposeHook)
           
 void setID(java.lang.Integer id)
           
 void setInterFilterGroupOperator(InterFilterGroupOperator op)
           
 void setIsIDPublic(boolean isIDPublic)
           
 void setOfferManager(OfferManager offerManager)
           
 void setORB(ORB orb)
           
 void setPOA(POA poa)
           
 void setSubscriptionManager(SubscriptionManager subscriptionManager)
           
 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, getSubsequentFilterStages, hasMessageConsumer
 
Methods inherited from interface org.jacorb.notification.servant.ManageableServant
activate
 

Field Detail

DEFAULT_FILTER_GROUP_OPERATOR

protected static final InterFilterGroupOperator DEFAULT_FILTER_GROUP_OPERATOR
the default InterFilterGroupOperator used.


offerManager_

protected OfferManager offerManager_

subscriptionManager_

protected SubscriptionManager subscriptionManager_

logger_

protected 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_
Constructor Detail

AbstractAdmin

protected AbstractAdmin()

AbstractAdmin

protected AbstractAdmin(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

getChannelContext

public ChannelContext getChannelContext()

setDisposeHook

public void setDisposeHook(java.lang.Runnable disposeHook)

setInterFilterGroupOperator

public void setInterFilterGroupOperator(InterFilterGroupOperator op)

setID

public void setID(java.lang.Integer id)

setIsIDPublic

public void setIsIDPublic(boolean isIDPublic)

getPOA

protected POA getPOA()

setPOA

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

getORB

protected ORB getORB()

setORB

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

getMessageFactory

protected MessageFactory getMessageFactory()

getChannelServant

protected EventChannelImpl getChannelServant()

_default_POA

public POA _default_POA()

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

MyChannel

public EventChannel MyChannel()

MyID

public int MyID()

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

dispose

public void dispose()

deactivate

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

getServant

public abstract Servant getServant()

getID

public java.lang.Integer getID()

isDisposed

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

Specified by:
isDisposed in interface FilterStage

fireCreateProxyRequestEvent

protected void fireCreateProxyRequestEvent()
                                    throws AdminLimitExceeded
Throws:
AdminLimitExceeded

hasLifetimeFilter

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

Specified by:
hasLifetimeFilter in interface FilterStage

hasPriorityFilter

public boolean hasPriorityFilter()
admin does not 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

setOfferManager

public void setOfferManager(OfferManager offerManager)

setSubscriptionManager

public void setSubscriptionManager(SubscriptionManager subscriptionManager)

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.


configureEventStyleID

protected void configureEventStyleID(AbstractProxy proxy)
configure a event style proxy. the key is only for internal use. especially the key cannot used to fetch the proxy via get_proxy_consumer or get_proxy_supplier.


configureNotifyStyleID

protected void configureNotifyStyleID(AbstractProxy proxy)
configure the ID for a notify style proxy. the id is public. the proxy can be accessed via a call to get_proxy_consumer or get_proxy_supplier.


configureQoS

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


configureInterFilterGroupOperator

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


configureManagers

protected void configureManagers(AbstractProxy proxy)
configure OfferManager and SubscriptionManager for a proxy.


preActivate

public void preActivate()
satisfy method implementation

Specified by:
preActivate in interface ManageableServant

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)

getProxies

public final java.util.List getProxies()