3 import java.util.ArrayList;
4 import org.opensrf.util.*;
7 public class Method extends OSRFObject {
10 private List<Object> params;
12 private static OSRFRegistry registry =
13 OSRFRegistry.registerObject(
15 OSRFRegistry.WireProtocol.HASH,
16 new String[] {"method", "params"});
18 public Method(String name) {
20 this.params = new ArrayList<Object>(8);
23 public Method(String name, List<Object> params) {
28 public String getName() {
31 public List<Object> getParams() {
36 * Pushes a new param object onto the set of params
37 * @param p The new param to add to the method.
39 public void addParam(Object p) {
44 * Implements the generic get() API required by OSRFSerializable
46 public Object get(String field) {
47 if("method".equals(field))
49 if("params".equals(field))
54 public OSRFRegistry getRegistry() {