当前页面:
在线文档首页 >
JBoss Seam 1.1.0 API 英文版文档
InterfaceGenerator (JBoss Seam API Documentation) - JBoss Seam 1.1.0 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,
Set<Type> types)
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
getAccessibleProperties
public static Set<String> getAccessibleProperties(Class cls)
- A helper method, used internally by InterfaceGenerator and also when
serializing responses. Returns a list of the property names for the specified
class which should be included in the generated interface for the type.
- Parameters:
cls
- Class
- Returns:
- List
getFieldType
protected String getFieldType(Type type)
- Returns the remoting "type" for a specified class.
- Parameters:
type
- Class
- Returns:
- String