KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > bus > ws > rm > RMUtils


1 package org.objectweb.celtix.bus.ws.rm;
2
3 import org.objectweb.celtix.bus.ws.addressing.AddressingConstantsImpl;
4 import org.objectweb.celtix.bus.ws.addressing.VersionTransformer;
5 import org.objectweb.celtix.bus.ws.policy.PolicyConstantsImpl;
6 import org.objectweb.celtix.bus.ws.rm.persistence.PersistenceUtils;
7 import org.objectweb.celtix.ws.addressing.AddressingConstants;
8 import org.objectweb.celtix.ws.addressing.v200408.AttributedURI;
9 import org.objectweb.celtix.ws.addressing.v200408.EndpointReferenceType;
10
11 import org.objectweb.celtix.ws.policy.PolicyConstants;
12 import org.objectweb.celtix.ws.rm.RMConstants;
13
14 public final class RMUtils {
15    
16     private static final org.objectweb.celtix.ws.addressing.v200408.ObjectFactory WSA_FACTORY;
17     private static final org.objectweb.celtix.ws.rm.ObjectFactory WSRM_FACTORY;
18     private static final org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory WSRM_CONF_FACTORY;
19     private static final org.objectweb.celtix.ws.rm.policy.ObjectFactory WSRM_POLICY_FACTORY;
20     private static final RMConstants WSRM_CONSTANTS;
21     private static final AddressingConstants WSA_CONSTANTS;
22     private static final PolicyConstants WSP_CONSTANTS;
23     private static final PersistenceUtils WSRM_PERSISTENCE_UTILS;
24     
25     static {
26         WSA_FACTORY = new org.objectweb.celtix.ws.addressing.v200408.ObjectFactory();
27         WSRM_FACTORY = new org.objectweb.celtix.ws.rm.ObjectFactory();
28         WSRM_CONF_FACTORY = new org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory();
29         WSRM_POLICY_FACTORY = new org.objectweb.celtix.ws.rm.policy.ObjectFactory();
30         WSRM_CONSTANTS = new RMConstantsImpl();
31         WSA_CONSTANTS = new AddressingConstantsImpl();
32         WSP_CONSTANTS = new PolicyConstantsImpl();
33         WSRM_PERSISTENCE_UTILS = new PersistenceUtils();
34     }
35     
36     /**
37      * prevent instantiation
38      *
39      */

40     protected RMUtils() {
41     }
42     
43     public static org.objectweb.celtix.ws.addressing.v200408.ObjectFactory getWSAFactory() {
44         return WSA_FACTORY;
45     }
46     
47     public static org.objectweb.celtix.ws.rm.ObjectFactory getWSRMFactory() {
48         return WSRM_FACTORY;
49     }
50
51     public static org.objectweb.celtix.bus.configuration.wsrm.ObjectFactory getWSRMConfFactory() {
52         return WSRM_CONF_FACTORY;
53     }
54     
55     public static org.objectweb.celtix.ws.rm.policy.ObjectFactory getWSRMPolicyFactory() {
56         return WSRM_POLICY_FACTORY;
57     }
58     
59     public static RMConstants getRMConstants() {
60         return WSRM_CONSTANTS;
61     }
62     
63     public static AddressingConstants getAddressingConstants() {
64         return WSA_CONSTANTS;
65     }
66     
67     public static PolicyConstants getPolicyConstants() {
68         return WSP_CONSTANTS;
69     }
70     
71     public static PersistenceUtils getPersistenceUtils() {
72         return WSRM_PERSISTENCE_UTILS;
73     }
74     
75     public static EndpointReferenceType createReference(String JavaDoc address) {
76         EndpointReferenceType ref =
77             VersionTransformer.Names200408.WSA_OBJECT_FACTORY.createEndpointReferenceType();
78         AttributedURI value =
79             VersionTransformer.Names200408.WSA_OBJECT_FACTORY.createAttributedURI();
80         value.setValue(address);
81         ref.setAddress(value);
82         return ref;
83     }
84 }
85
Popular Tags