private SSLClientPolicy getSSLClientPolicy(Configuration conf) { SSLClientPolicy pol = conf.getObject(SSLClientPolicy.class, "sslClient"); if (pol == null) { pol = new SSLClientPolicy(); } return pol; }
public EndpointPolicyType getPolicies() { return (EndpointPolicyType)handler.getConfiguration().getObject(POLICIES_PROPERTY_NAME); }
private JettyHTTPServerEngine(Bus bus, String protocol, int p) { port = p; config = createConfiguration(bus, port); policy = config.getObject(HTTPListenerPolicy.class, "httpListener"); sslPolicy = config.getObject(SSLServerPolicy.class, "sslServer"); if (sslPolicy == null && "https".equals(protocol)) { sslPolicy = new SSLServerPolicy(); } }
private JMSAddressPolicyType getAddressPolicy(Configuration conf) { JMSAddressPolicyType pol = conf.getObject(JMSAddressPolicyType.class, "jmsAddress"); if (pol == null) { pol = new JMSAddressPolicyType(); } return pol; }
private HTTPClientPolicy getClientPolicy(Configuration conf) { HTTPClientPolicy pol = conf.getObject(HTTPClientPolicy.class, "httpClient"); if (pol == null) { pol = new HTTPClientPolicy(); } return pol; } private AuthorizationPolicy getAuthPolicy(String type, Configuration conf) {
private AuthorizationPolicy getAuthPolicy(String type, Configuration conf) { AuthorizationPolicy pol = conf.getObject(AuthorizationPolicy.class, type); if (pol == null) { pol = new AuthorizationPolicy(); } return pol; }
private JMSServerBehaviorPolicyType getServerPolicy(Configuration conf) { JMSServerBehaviorPolicyType pol = conf.getObject(JMSServerBehaviorPolicyType.class, "jmsServer"); if (pol == null) { pol = new JMSServerBehaviorPolicyType(); } return pol; }
private JMSClientBehaviorPolicyType getClientPolicy(Configuration conf) { JMSClientBehaviorPolicyType pol = conf.getObject(JMSClientBehaviorPolicyType.class, "jmsClient"); if (pol == null) { pol = new JMSClientBehaviorPolicyType(); } return pol; }
private HTTPServerPolicy getServerPolicy(Configuration conf) { HTTPServerPolicy pol = conf.getObject(HTTPServerPolicy.class, "httpServer"); if (pol == null) { pol = new HTTPServerPolicy(); } return pol; }
private void configureSchemaValidation() { Boolean enableSchemaValidation = configuration.getObject(Boolean.class, "enableSchemaValidation"); if (enableSchemaValidation != null && enableSchemaValidation.booleanValue()) { LOG.fine("endpoint schema validation enabled"); schema = EndpointReferenceUtils.getSchema(bus.getWSDLManager(), reference); } }
Object getPluginByName(String pluginName, PluginInfo dependent) throws PluginException { String key = PLUGINS_CLASSNAME_FMT.format(pluginName); Configuration configuration = getConfiguration(); String pluginClassName = (String)configuration.getObject(key); return getPlugin(pluginName, pluginClassName, dependent); }
public RMStore getStore(Configuration c) { StoreType s = c.getObject(StoreType.class, "store"); assert null != s; if (null == theStore) { createStore(s); initStore(s); } return theStore; }
public final String[] getFactoriesInfor(String cfgName) { List<String> factoriesList = new ArrayList<String>(); Object obj = bus.getConfiguration().getObject(cfgName); assert obj != null; List<ClassNamespaceMappingType> factoryMappings = ((ClassNamespaceMappingListType)obj).getMap(); for (ClassNamespaceMappingType mapping : factoryMappings) { String classname = mapping.getClassname(); List<String> namespaceList = mapping.getNamespace(); for (String namespace : namespaceList) { String temp = "NameSpace: " + namespace + "\n FactoryClass: " + classname; factoriesList.add(temp); } } String[] factories = new String[factoriesList.size()]; return factoriesList.toArray(factories); }
public BindingManagerImpl(Bus b) throws BusException { bindingFactories = new ConcurrentHashMap<String, BindingFactory>(); bus = b; Object obj = bus.getConfiguration().getObject("bindingFactories"); List<ClassNamespaceMappingType> factoryMappings = ((ClassNamespaceMappingListType)obj).getMap(); for (ClassNamespaceMappingType mapping : factoryMappings) { String classname = mapping.getClassname(); List<String> namespaceList = mapping.getNamespace(); String[] namespaces = new String[namespaceList.size()]; namespaceList.toArray(namespaces); loadBindingFactory(classname, namespaces); } }
public TransportFactoryManagerImpl(Bus b) throws BusException { transportFactories = new ConcurrentHashMap<String, TransportFactory>(); bus = b; /* loadTransportFactory("org.objectweb.celtix.bus.transports.http.HTTPTransportFactory", "http://schemas.xmlsoap.org/wsdl/soap/", "http://celtix.objectweb.org/transports/http/configuration"); */ Object obj = bus.getConfiguration().getObject("transportFactories"); List<ClassNamespaceMappingType> factoryMappings = ((ClassNamespaceMappingListType)obj).getMap(); for (ClassNamespaceMappingType mapping : factoryMappings) { String classname = mapping.getClassname(); List<String> namespaceList = mapping.getNamespace(); String[] namespaces = new String[namespaceList.size()]; namespaceList.toArray(namespaces); loadTransportFactory(classname, namespaces); } }
/** * Obtain handler chain from configuration first. If none is specified, * default to the chain configured in the code, i.e. in annotations. * */ private void configureHandlers() { LOG.fine("loading handler chain for endpoint"); AnnotationHandlerChainBuilder builder = new AnnotationHandlerChainBuilder(); HandlerChainType hc = (HandlerChainType)configuration.getObject("handlerChain"); List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc); if (null == chain || chain.size() == 0) { chain = builder.buildHandlerChainFor(implementorClass); } serverBinding.getBinding().setHandlerChain(chain); }
public SourcePolicyType getSourcePolicies() { SourcePolicyType sp = (SourcePolicyType)getHandler().getConfiguration() .getObject(SourcePolicyType.class, SOURCE_POLICIES_PROPERTY_NAME); if (null == sp) { sp = RMUtils.getWSRMConfFactory().createSourcePolicyType(); } return sp; }
public DestinationPolicyType getDestinationPolicies() { DestinationPolicyType dp = getHandler().getConfiguration() .getObject(DestinationPolicyType.class, DESTINATION_POLICIES_PROPERTY_NAME); if (null == dp) { dp = RMUtils.getWSRMConfFactory().createDestinationPolicyType(); } return dp; }
public EndpointInvocationHandler(Bus b, EndpointReferenceType reference, ServiceDelegate s, Configuration configuration, Class<?> portSEI) { bus = b; service = s; portTypeInterface = portSEI; clientBinding = createBinding(reference, configuration); setBinding(clientBinding.getBinding()); try { context = JAXBEncoderDecoder.createJAXBContextForClass(portSEI); Boolean enableSchemaValidation = configuration.getObject(Boolean.class, "enableSchemaValidation"); if (enableSchemaValidation != null && enableSchemaValidation.booleanValue()) { LOG.fine("port schema validation enabled"); schema = EndpointReferenceUtils.getSchema(b.getWSDLManager(), reference); } } catch (JAXBException ex1) { // TODO Auto-generated catch block ex1.printStackTrace(); context = null; } }
/** * Configure the system handlers specified in configuration * */ public void configureSystemHandlers(Configuration c) { HandlerChainBuilder builder = new HandlerChainBuilder(); SystemHandlerChainType sh = (SystemHandlerChainType)c.getObject(SYSTEM_HANDLER_CHAIN_PROPERTY_NAME); if (null != sh) { preLogicalSystemHandlers = builder.buildHandlerChainFromConfiguration(sh.getPreLogical()); postLogicalSystemHandlers = builder.buildHandlerChainFromConfiguration(sh.getPostLogical()); preProtocolSystemHandlers = builder.buildHandlerChainFromConfiguration(sh.getPreProtocol()); postProtocolSystemHandlers = builder.buildHandlerChainFromConfiguration(sh.getPostProtocol()); } }