站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.1.0 cr1 API 英文版文档

InterfaceGenerator (JBoss Seam API Documentation) - JBoss Seam 1.1.0 cr1 API 英文版文档


org.jboss.seam.remoting
Class InterfaceGenerator

java.lang.Object
  extended by org.jboss.seam.remoting.BaseRequestHandler
      extended by org.jboss.seam.remoting.InterfaceGenerator
All Implemented Interfaces:
RequestHandler

public class InterfaceGenerator
extends BaseRequestHandler
implements RequestHandler

Generates JavaScript interface code.

Author:
Shane Bryzak

Field Summary
 
Fields inherited from interface org.jboss.seam.remoting.RequestHandler
BODY_TAG_CLOSE, BODY_TAG_OPEN, ENVELOPE_TAG_CLOSE, ENVELOPE_TAG_OPEN, REF_TAG_CLOSE, REF_TAG_OPEN_END, REF_TAG_OPEN_START, REFS_TAG_CLOSE, REFS_TAG_OPEN
 
Constructor Summary
InterfaceGenerator()
           
 
Method Summary
 void generateComponentInterface(Component[] components, OutputStream out, Set<Type> types)
          Generates the JavaScript code required to invoke the methods of a component/s.
static Set<String> getAccessibleProperties(Class cls)
          A helper method, used internally by InterfaceGenerator and also when serializing responses.
protected  String getFieldType(Type type)
          Returns the remoting "type" for a specified class.
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void setServletContext(javax.servlet.ServletContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceGenerator

public InterfaceGenerator()
Method Detail

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 - HttpServletRequest
response - 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 for
out - 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