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

com.jianggujin.modulelink.JModule Maven / Gradle / Ivy

/**
 * Copyright 2018 jianggujin (www.jianggujin.com).
 * 
 * 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 com.jianggujin.modulelink;

import java.util.Set;

/**
 * 模块接口
 *
 */
public interface JModule {

   /**
    * 获取全部的Action名称
    * 
    * @return
    */
   Set getActionNames();

   /**
    * 查找指定名称的Action
    * 
    * @param name
    * @return
    */
   JAction findAction(String name);

   /**
    * 获得默认的Action,不一定存在
    * 
    * @return
    */
   JAction getDefaultAction();

   /**
    * 查找处理请求的Action
    * 
    * @param actionName
    * @param in
    * @return
    */
   Object doAction(String actionName, Object in);

   /**
    * 是否存在Action
    * 
    * @param actionName
    * @return
    */
   boolean hasAction(String actionName);

   /**
    * 执行默认的Action
    * 
    * @param in
    * @return
    */
   Object doDefaultAction(Object in);

   /**
    * 是否有默认Action
    * 
    * @return
    */
   boolean hasDefaultAction();

   /**
    * 销毁
    */
   void destroy();

   /**
    * 获取模块配置
    *
    * @return
    */
   JModuleConfig getModuleConfig();

   /**
    * 获得模块类加载器
    * 
    * @return
    */
   ClassLoader getModuleClassLoader();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy