2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.binding.jsonrpc.provider
Class ScaDomainScriptServlet
java.lang.Object
HttpServlet
org.apache.tuscany.sca.binding.jsonrpc.provider.ScaDomainScriptServlet
public class ScaDomainScriptServlet
- extends HttpServlet
Servlet to handle requests for the scaDomain.js script.
This script wrappers the JSON-RPC-Java jsonrpc.js script
adding in at the bottom the JavaScript to create and initialize
the variables representing the SCA services.
Field Summary |
protected java.util.List<java.lang.String> |
serviceNames
|
Method Summary |
void |
addService(java.lang.String serviceName)
|
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
java.util.List<java.lang.String> |
getServiceNames()
|
void |
removeService(java.lang.String serviceName)
|
protected void |
writeJSONRPCJavaScript(ServletOutputStream os)
Reads the jsonrpc.js script from the classpath and adds its contents to the output stream. |
protected void |
writeScaDomainCode(ServletOutputStream out,
java.lang.String path)
Creates a JavaScript variable within the scaDomain script for each SCA service and
initializes its value with the JSON-RPC client to invoke the serverside service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serviceNames
protected transient java.util.List<java.lang.String> serviceNames
ScaDomainScriptServlet
public ScaDomainScriptServlet()
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
writeScaDomainCode
protected void writeScaDomainCode(ServletOutputStream out,
java.lang.String path)
throws java.io.IOException
- Creates a JavaScript variable within the scaDomain script for each SCA service and
initializes its value with the JSON-RPC client to invoke the serverside service.
- Throws:
java.io.IOException
writeJSONRPCJavaScript
protected void writeJSONRPCJavaScript(ServletOutputStream os)
throws java.io.IOException
- Reads the jsonrpc.js script from the classpath and adds its contents to the output stream.
- Throws:
java.io.IOException
addService
public void addService(java.lang.String serviceName)
removeService
public void removeService(java.lang.String serviceName)
getServiceNames
public java.util.List<java.lang.String> getServiceNames()