⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 package-info.java

📁 dwr 源文件 dwr 源文件 dwr 源文件
💻 JAVA
字号:
/*
 * Copyright 2006 Maik Schreiber <blizzy AT blizzy DOT de>
 *
 * 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.
 */

/**
 * <p>Provides annotations support for DWR. This can be used as a replacement as well as
 * in conjunction with {@code dwr.xml}.</p>
 * 
 * <h3>Setup</h3>
 * 
 * <p>To use DWR with annotations you need to specify a different DWR controller
 * servlet in your {@code web.xml}:</p>
 * 
 * <p><pre>
 * {@literal <servlet>}
 *    {@literal <description>}DWR controller servlet{@literal </description>}
 *    {@literal <servlet-name>}DWR controller servlet{@literal </servlet-name>}
 *    {@literal <servlet-class>}{@linkplain org.directwebremoting.servlet.DwrServlet org.directwebremoting.servlet.DwrServlet}{@literal </servlet-class>}
 *    {@literal <init-param>}
 *       {@literal <param-name>}classes{@literal </param-name>}
 *       {@literal <param-value>}
 *          com.example.RemoteFunctions,
 *          com.example.RemoteBean
 *       {@literal </param-value>}
 *    {@literal </init-param>}
 * {@literal </servlet>}
 * </pre></p>
 * 
 * <p>The {@code classes} servlet parameter must provide a comma-separated list of the
 * fully-qualified class names of all annotated classes to be used with DWR.</p>
 * 
 * <h3>Remote Class Access</h3>
 * 
 * <p>To make a simple class available for remote access, use the
 * {@link org.directwebremoting.annotations.Create Create} and
 * {@link org.directwebremoting.annotations.RemoteMethod RemoteMethod} annotations:</p>
 * 
 * <p><pre>
 * {@literal @Create}
 * public class RemoteFunctions {
 *    {@literal @RemoteMethod}
 *    public int calculateFoo() {
 *      return 42;
 *    }
 * }
 * </pre></p>
 * 
 * <p>Any method not annotated with {@code RemoteMethod} will not be available
 * for remote access.</p>
 * 
 * <p>To use a scripting name different from the class name, use the
 * {@code name} attribute of {@code Create}:</p>
 * 
 * <p><pre>
 * {@literal @Create}(name="Functions")
 * public class RemoteFunctions {
 * }
 * </pre></p>
 * 
 * <h3>Object Conversion</h3>
 * 
 * <p>To make simple bean classes available for remote access, use the
 * {@link org.directwebremoting.annotations.Convert Convert} and
 * {@link org.directwebremoting.annotations.RemoteProperty RemoteProperty} annotations:</p>
 * 
 * <p><pre>
 * {@literal @Convert}
 * public class Foo {
 *    {@literal @RemoteProperty}
 *    private int foo;
 *    
 *    public int getFoo() {
 *       return foo;
 *    }
 *    
 *    {@literal @RemoteProperty}
 *    public int getBar() {
 *       return foo * 42;
 *    }
 * }
 * </pre></p>
 * 
 * <p>To use more sophisticated converters see the
 * {@link org.directwebremoting.annotations.Convert#converter converter} attribute of the
 * {@code Convert} annotation.</p>
 * 
 * @author Maik Schreiber &lt;blizzy AT blizzy DOT de&gt;
 */
package org.directwebremoting.annotations;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -