All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.webflow.definition.registry.FlowDefinitionRegistryMBean Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
/*
 * Copyright 2002-2006 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.webflow.definition.registry;

/**
 * A management interface for managing flow definition registries at runtime.
 * Provides the ability to query the size and state of the registry, as well as
 * refresh registered flow definitions at runtime.
 * 

* Flow registries that implement this interface may be exposed for management * over the JMX protocol. The following is an example of using Spring's JMX * MBeanExporter to export a flow registry to an MBeanServer: *

 *     <!-- Creates the registry of flow definitions for this application -->
 *     <bean name="flowRegistry" class="org.springframework.webflow...XmlFlowRegistryFactoryBean">
 *         <property name="locations" value="/WEB-INF/flow1.xml"/>
 *     </bean>
 *  
 *     <!-- Automatically exports the created flowRegistry as an MBean -->
 *     <bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
 *         <property name="beans">
 *             <map>
 *                 <entry key="spring-webflow:name=flowRegistry" value-ref="flowRegistry"/>
 *             </map>
 *         </property>
 *         <property name="assembler">
 *             <bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
 *                 <property name="managedInterfaces" value="org.springframework.webflow.definition.registry.FlowDefinitionRegistryMBean"/>
 *             </bean>
 *         </property>
 *     </bean>
 * 
* With the above configuration, you may then use any JMX client (such as Sun's * jConsole which ships with JDK 1.5) to refresh flow definitions at runtime. * * @author Keith Donald */ public interface FlowDefinitionRegistryMBean { /** * Returns the ids of the flow definitions registered in this registry. * @return the flow definition ids */ public String[] getFlowDefinitionIds(); /** * Return the number of flow definitions registered in this registry. * @return the flow definition count */ public int getFlowDefinitionCount(); /** * Queries this registry to determine if a specific flow is contained within * it. * @param id the flow definition id * @return true if a flow definition is contained in this registry with the * id provided */ public boolean containsFlowDefinition(String id); /** * Refresh this flow definition registry, reloading all Flow definitions * from their externalized representations. */ public void refresh() throws FlowDefinitionConstructionException; /** * Refresh the Flow definition in this registry with the id * provided, reloading it from it's externalized representation * @param flowDefinitionId the id of the flow definition to refresh * @throws NoSuchFlowDefinitionException if a flow with the id provided is not * stored in this registry */ public void refresh(String flowDefinitionId) throws NoSuchFlowDefinitionException, FlowDefinitionConstructionException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy