jrunx.kernel
Class ServicePartition
jrunx.kernel.ServiceAdapter
|
+--jrunx.kernel.ServicePartition
- All Implemented Interfaces:
- javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean
- Direct Known Subclasses:
- ConfigurableServicePartition, JMSServicePartition, JRunJMSAdapter
- public abstract class ServicePartition
- extends ServiceAdapter
- implements ServicePartitionMBean
Implementation of a Service Partition. Itmakes use of JMX domains
in order to isolate the Services it contains. ServicePartition extensions
can create their Services programmatically, through the use of metadata,
or in any other manner as described in the Service. Regardless, the
ServicePartition must have a domain name associated with it. If one
is not explicitly assigned, then the Service's name will be used as the domain
name. If the service has no name and no domain name, a ServiceException
is thrown.
- Author:
- PS Neville, Karl Moss
- See Also:
- Serialized Form
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
|
Method Summary |
void |
addService(ServiceMBean service)
Add a ServiceMBean to the partitioned Services. |
void |
addService(ServiceMBean service,
javax.management.ObjectName serviceName)
Add a ServiceMBean to the partitioned Services using the
specified ObjectName for the Service. |
java.util.Iterator |
getServices()
This method returns the actual instances of the registered services for
this partition. |
protected void |
invokeChain(java.lang.String methodName,
java.lang.Object[] params,
java.lang.String[] types)
Invokes all of the services in the chain of services for this partition. |
java.util.Iterator |
iterator()
Return an iteration of these partitioned services. |
void |
removeService(javax.management.ObjectName objectName)
Remove a ServiceMBean from the partitioned Services by its ObjectName |
void |
removeService(ServiceMBean service)
Remove a ServiceMBean from the partitioned Services |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, destroy, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, init, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, start, stop, toString, unbind, unscheduleRunnable, updateStatus |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
sortedServices
protected java.util.ArrayList sortedServices
ServicePartition
public ServicePartition()
addService
public void addService(ServiceMBean service)
throws java.lang.Exception
- Add a ServiceMBean to the partitioned Services.
- Specified by:
addService in interface ServicePartitionMBean
addService
public void addService(ServiceMBean service,
javax.management.ObjectName serviceName)
throws java.lang.Exception
- Add a ServiceMBean to the partitioned Services using the
specified ObjectName for the Service.
- Specified by:
addService in interface ServicePartitionMBean
removeService
public void removeService(ServiceMBean service)
throws java.lang.Exception
- Remove a ServiceMBean from the partitioned Services
- Specified by:
removeService in interface ServicePartitionMBean
removeService
public void removeService(javax.management.ObjectName objectName)
throws java.lang.Exception
- Remove a ServiceMBean from the partitioned Services by its ObjectName
- Specified by:
removeService in interface ServicePartitionMBean
iterator
public java.util.Iterator iterator()
- Description copied from interface:
ServicePartitionMBean
- Return an iteration of these partitioned services.
- Specified by:
iterator in interface ServicePartitionMBean
getServices
public java.util.Iterator getServices()
- This method returns the actual instances of the registered services for
this partition. This would be handy, for example, when you need to
access the services directly (not via JMX).
invokeChain
protected void invokeChain(java.lang.String methodName,
java.lang.Object[] params,
java.lang.String[] types)
- Invokes all of the services in the chain of services for this partition.
It is assumed that the services follow an interceptor pattern where
the method invoked returns a Boolean that determines whether the next
service in the chain should be invoked
- Parameters:
methodName - The method nameparams - The parameterstypes - The parameter types
Copyright � 2002 Macromedia Corporation. All Rights Reserved.