01: package com.sun.xml.ws.client.sei;
02:
03: import com.sun.xml.ws.model.ParameterImpl;
04:
05: import javax.jws.WebParam;
06:
07: /**
08: * {@link ValueGetterFactory} is used to create {@link ValueGetter} objects.
09: *
10: * @author Jitendra Kotamraju
11: */
12: abstract class ValueGetterFactory {
13:
14: abstract ValueGetter get(ParameterImpl p);
15:
16: static final ValueGetterFactory SYNC = new ValueGetterFactory() {
17: ValueGetter get(ParameterImpl p) {
18: return (p.getMode() == WebParam.Mode.IN || p.getIndex() == -1) ? ValueGetter.PLAIN
19: : ValueGetter.HOLDER;
20: }
21: };
22:
23: /**
24: * In case of SEI async signatures, there are no holders. The OUT
25: * parameters go in async bean class
26: */
27: static final ValueGetterFactory ASYNC = new ValueGetterFactory() {
28: ValueGetter get(ParameterImpl p) {
29: return ValueGetter.PLAIN;
30: }
31: };
32:
33: }
|