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