当前页面:
在线文档首页 >
JBoss Seam 1.0.1 API 英文版文档
InterfaceGenerator (JBoss Seam API Documentation) - JBoss Seam 1.0.1 API 英文版文档
org.jboss.seam.remoting
Class InterfaceGenerator
java.lang.Object
org.jboss.seam.remoting.BaseRequestHandler
org.jboss.seam.remoting.InterfaceGenerator
- All Implemented Interfaces:
- RequestHandler
public class InterfaceGenerator
- extends BaseRequestHandler
- implements RequestHandler
Generates JavaScript interface code.
- Author:
- Shane Bryzak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterfaceGenerator
public InterfaceGenerator()
setServletContext
public void setServletContext(javax.servlet.ServletContext ctx)
- Specified by:
setServletContext
in interface RequestHandler
- Overrides:
setServletContext
in class BaseRequestHandler
handle
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
- Specified by:
handle
in interface RequestHandler
- Parameters:
request
- HttpServletRequestresponse
- HttpServletResponse
- Throws:
Exception
generateComponentInterface
public void generateComponentInterface(Component[] components,
OutputStream out)
throws IOException
- Generates the JavaScript code required to invoke the methods of a component/s.
- Parameters:
components
- Component[] The components to generate javascript forout
- OutputStream The OutputStream to write the generated javascript to
- Throws:
IOException
- Thrown if there is an error writing to the OutputStream
getAccessibleFields
public static List<Field> getAccessibleFields(Class cls)
- A helper method, used internally by InterfaceGenerator and also when
serializing responses. Returns a list of the fields for the specified type
which should be included in the generated interface for the type.
- Parameters:
cls
- Class
- Returns:
- List