org.jboss.deployers.spi.management.RuntimeComponentDispatcher Maven / Gradle / Ivy
/*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.deployers.spi.management;
import org.jboss.metatype.api.values.MetaValue;
/**
* Dispatches ManagedOperation invocation to runtime component
* associated with attachment.
*
* @author Ales Justin
* @version $Revision: 88968 $
*/
public interface RuntimeComponentDispatcher
{
/**
* Get value.
*
* @param componentName the runtime component name
* @param propertyName the property name
* @return the return meta value
*/
MetaValue get(Object componentName, String propertyName);
/**
* Set the value.
*
* @param componentName the runtime component name
* @param propertyName the property name
* @param value the meta value
*/
void set(Object componentName, String propertyName, MetaValue value);
/**
* Dispatch ManagedOperation invocation
* with param parameters to coresponding attachment.
*
* @param componentName the runtime component name
* @param methodName the methodName
* @param param the parameters
* @return runtime component's return value
*/
Object invoke(Object componentName, String methodName, MetaValue... param);
/**
* Map the state of the component.
*
* @param the state enum
* @param name the component name
* @param mapper the state mapper
* @return the mapped state
*/
> T mapControllerState(Object name, ContextStateMapper mapper);
}