001: package org.mandarax.jdbc.rpc;
002:
003: /*
004: * Copyright (C) 1999-2004 <a href="mailto:mandarax@jbdietrich.com">Jens Dietrich</a>
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: */
020:
021: /**
022: * Instances represent a method call on the server. The object is represented by a name.
023: * This name must be resolved. If http/servlets are used, this could be the name
024: * of the session attribute that holds the object.
025: * @author <A HREF="mailto:mandarax@jbdietrich.com">Jens Dietrich</A>
026: * @version 3.3.2 <29 December 2004>
027: * @since 3.0
028: */
029:
030: public class Call implements java.io.Serializable {
031: private String ref = null;
032: private Object[] param = null;
033: private String method = null;
034:
035: /**
036: * Constructor.
037: */
038: public Call() {
039: super ();
040: }
041:
042: /**
043: * Constructor.
044: * @param ref an object reference
045: * @param method the method to be called
046: * @param param an array of parameters
047: */
048: public Call(String ref, String method, Object[] param) {
049: super ();
050: this .ref = ref;
051: this .method = method;
052: this .param = param;
053: }
054:
055: /**
056: * Constructor.
057: * @param ref an object reference
058: * @param method the method to be called
059: * @param param a single parameter
060: */
061: public Call(String ref, String method, Object param) {
062: super ();
063: this .ref = ref;
064: this .method = method;
065: this .param = new Object[] { param };
066: }
067:
068: /**
069: * Constructor.
070: * @param ref an object reference
071: * @param method the method to be called
072: */
073: public Call(String ref, String method) {
074: super ();
075: this .ref = ref;
076: this .method = method;
077: this .param = new Object[] {};
078: }
079:
080: /**
081: * Get the parameters
082: * @return
083: */
084: public Object[] getParam() {
085: return param;
086: }
087:
088: /**
089: * Set the parameters.
090: * @param param an array of parameters
091: */
092: public void setParam(Object[] param) {
093: this .param = param;
094: }
095:
096: /**
097: * Get the reference.
098: * @return an object reference
099: */
100: public String getRef() {
101: return ref;
102: }
103:
104: /**
105: * Set the reference
106: * @param ref an object reference
107: */
108: public void setRef(String ref) {
109: this .ref = ref;
110: }
111:
112: /**
113: * Get the method.
114: * @return
115: */
116: public String getMethod() {
117: return method;
118: }
119:
120: /**
121: * Set the method.
122: * @param method
123: */
124: public void setMethod(String method) {
125: this.method = method;
126: }
127:
128: }
|