1 22 package org.jboss.mq.il.http; 23 24 import java.io.Serializable ; 25 26 33 public class HTTPILRequest implements Serializable 34 { 35 static final long serialVersionUID = -4303390310602251849L; 36 private String methodName; 37 private Object [] arguments; 38 private Class [] argumentTypes; 39 40 public HTTPILRequest() 41 { 42 } 43 44 public HTTPILRequest(String methodName, Object [] arguments, Class [] argumentTypes) 45 { 46 this.methodName = methodName; 47 this.arguments = arguments; 48 this.argumentTypes = argumentTypes; 49 } 50 51 public void setMethodName(String methodName) 52 { 53 this.methodName = methodName; 54 } 55 56 public String getMethodName() 57 { 58 return this.methodName; 59 } 60 61 public void setArguments(Object [] arguments, Class [] argumentTypes) 62 { 63 this.arguments = arguments; 64 this.argumentTypes = argumentTypes; 65 } 66 67 public Object [] getArguments() 68 { 69 return this.arguments; 70 } 71 72 public Class [] getArgumentTypes() 73 { 74 return this.argumentTypes; 75 } 76 77 public String toString() 78 { 79 String argumentString = "("; 80 if (this.arguments != null) 81 { 82 for (int i = 0; i < this.arguments.length; i++ ) 83 { 84 if (i > 0) 85 { 86 argumentString = argumentString + ", "; 87 } 88 if (this.arguments[i] != null) 89 { 90 argumentString = argumentString + this.argumentTypes[i].toString() + " " + this.arguments[i].toString(); 91 } 92 else 93 { 94 argumentString = argumentString + this.argumentTypes[i].toString() + " null"; 95 } 96 } 97 } 98 argumentString = argumentString + ")"; 99 return this.methodName + argumentString; 100 } 101 } | Popular Tags |