1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.ksb.api.messaging; |
17 | |
|
18 | |
import org.apache.commons.lang.StringUtils; |
19 | |
import org.kuali.rice.ksb.api.bus.ServiceConfiguration; |
20 | |
|
21 | |
import java.io.Serializable; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
public class AsynchronousCall implements Serializable { |
29 | |
|
30 | |
private static final long serialVersionUID = -1036656564567726747L; |
31 | |
|
32 | |
private Object[] arguments; |
33 | |
|
34 | |
private Class<?>[] paramTypes; |
35 | |
|
36 | |
private ServiceConfiguration serviceConfiguration; |
37 | |
|
38 | |
private Serializable context; |
39 | |
|
40 | |
private String methodName; |
41 | |
|
42 | |
private AsynchronousCallback callback; |
43 | |
|
44 | |
private boolean ignoreStoreAndForward; |
45 | |
|
46 | 0 | public AsynchronousCall(Class<?>[] paramTypes, Object[] arguments, ServiceConfiguration serviceConfiguration, String methodName, AsynchronousCallback callback, Serializable context) { |
47 | 0 | this.arguments = arguments; |
48 | 0 | this.paramTypes = paramTypes; |
49 | 0 | this.serviceConfiguration = serviceConfiguration; |
50 | 0 | this.methodName = methodName; |
51 | 0 | this.callback = callback; |
52 | 0 | this.context = context; |
53 | 0 | } |
54 | |
|
55 | |
public Object[] getArguments() { |
56 | 0 | return this.arguments; |
57 | |
} |
58 | |
|
59 | |
public Class<?>[] getParamTypes() { |
60 | 0 | return this.paramTypes; |
61 | |
} |
62 | |
|
63 | |
public ServiceConfiguration getServiceConfiguration() { |
64 | 0 | return this.serviceConfiguration; |
65 | |
} |
66 | |
|
67 | |
public String getMethodName() { |
68 | 0 | return this.methodName; |
69 | |
} |
70 | |
|
71 | |
public AsynchronousCallback getCallback() { |
72 | 0 | return this.callback; |
73 | |
} |
74 | |
|
75 | |
public String toString() { |
76 | 0 | return "[AsynchronousCall: " + "serviceInfo=" + this.serviceConfiguration + ", methodName=" + this.methodName + ", paramTypes=" + getStringifiedArray(this.paramTypes) + ", arguments=" + getStringifiedArray(this.arguments) + "]"; |
77 | |
} |
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
private static final String getStringifiedArray(Object[] array) { |
87 | 0 | if (array == null) { |
88 | 0 | return null; |
89 | |
} |
90 | 0 | StringBuffer sb = new StringBuffer(array.getClass().toString()); |
91 | 0 | sb.append("["); |
92 | 0 | StringUtils.join(array, ", "); |
93 | 0 | sb.append("]"); |
94 | 0 | return sb.toString(); |
95 | |
} |
96 | |
|
97 | |
public boolean isIgnoreStoreAndForward() { |
98 | 0 | return this.ignoreStoreAndForward; |
99 | |
} |
100 | |
|
101 | |
public void setIgnoreStoreAndForward(boolean ignoreStoreAndForward) { |
102 | 0 | this.ignoreStoreAndForward = ignoreStoreAndForward; |
103 | 0 | } |
104 | |
|
105 | |
public Serializable getContext() { |
106 | 0 | return this.context; |
107 | |
} |
108 | |
|
109 | |
public void setContext(Serializable context) { |
110 | 0 | this.context = context; |
111 | 0 | } |
112 | |
|
113 | |
|
114 | |
} |