All signatures must implement the Java interface defined in ServletAPI.SignatureGenerator.
package ServletAPI;
public interface SignatureGenerator {
public String GetTypeSignatureID() throws ServletAPIException;
public String GetTypeSignatureDescriptor() throws ServletAPIException;
public ServletAPI.MethodSignature[] GetTypeSignature() throws ServletAPIException;
}
GetTypeSignatureID() should return the registered ID for this signature.
GetTypeSignatureDescriptor() should return a description of the type this signature defines.
GetTypeSignature() should return an array containing a MethodSignature instance for each method the type provides. MethodSignature is a class defined in the ServletAPI package which contains the methods name, descriptions of its parameters, and the MIME types it is capable of returning.
package ServletAPI;
public class MethodSignature {
public String methodName;
public ServletAPI.ParameterDescription[] parameters;
public ServletAPI.MIMETypedStream[] returnType;
public MethodSignature(String methodName, ServletAPI.ParameterDescription[] parameters)
}The ParameterDescription class is used when creating a MethodSignature. It contains a parameters name, the class it expects to be passed, a user-readable description, and its Domain.
package ServletAPI;
public class ParameterDescription {
public String name;
public Class type;
public String descriptor;
public Domain[] domain;
public ParameterDescription(String name, Class type, String descriptor, Domain[] domain);
}A parameters Domain describes the values it accepts as valid. The Domain is currently used only to provide feedback to the user during disseminator invocation. Presumably, the Domain will be used for argument validation and input form generation.
package ServletAPI;
public class Domain {
public String encoding;
public String value;
public Domain(String encoding, String value);
}
Examples of possible Domain encoding-value pairs are
["CommaSeparatedValues","foo,bar,do,re,mi"], ["SingleValue","foo"],
["NumericalRange","1-10000"], and ["LowercaseLetters","a-z"].
A working example of a type signature can be found in the file TestType.java.