jacol.processor
Class JavaProcessor

java.lang.Object
  |
  +--jacol.processor.JavaProcessor

public class JavaProcessor
extends java.lang.Object

This class is responsible for parsing inbound java request and invoking the corresponding methods. Any objects created from lisp are stored in this class.

Version:
0.20 beta
Author:
Jason Lowdermilk Email

Constructor Summary
JavaProcessor()
           
 
Method Summary
 void process(java.lang.String request, java.io.OutputStream out)
          Parse a request string, execute the corresponding Java code, and write the result back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaProcessor

public JavaProcessor()
Method Detail

process

public void process(java.lang.String request,
                    java.io.OutputStream out)
             throws java.lang.Exception
Parse a request string, execute the corresponding Java code, and write the result back.
 Request format:
 
     COMMAND CLASS METHOD [ARG1-VAL ARG1-TYPE ... ARGN-TYPE ARGN-TYPE]
 
 Commands are:
 
     invoke
     call
     call-static
     new
     get
     get-field
     get-instance-field
     delete
     shutdown
 
 Return format:
 
     The return type is always a string representing a number, followed
     by a status indicator.    The number "0" indicates the function
     returned nothing (void), or it returned null, or there was an
     error. Otherwise, the number is a key that refers to an object in
     the JVM. Methods that return primitive types are wrapped with the
     corresponding Java object. The key can be passed to subsequent
     method calls as a parameter, or methods on the object can be
     invoked via the "invoke" command. The string representation of
     the object can be retrieved via the "get" command.
 
     If an error occured, a message will be returned and the type
     will indicate an error.
 
 Status indicators:
 
     ok
     call-error (can't parse the parameters you passed, or can't find the class/method, etc)
     runtime-error (the method was called but it threw a runtime exception)
     auth-error (you tried to do something you aren't allowed)
 
Parameters:
request - a String representing a Java method call, object instantion, etc.