@SuppressWarnings("unchecked") public void raVerifyConfiguration(ConfigProperties properties) throws InvalidConfigurationException { String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY) .getValue(); if (!httpClientFactoryClassName.isEmpty()) { try { Integer j = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue(); if (j < 1) { throw new InvalidConfigurationException(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL + " must be > 0"); j = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE).getValue(); if (j < 1) { throw new InvalidConfigurationException(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE j = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue(); if (j < 1) { throw new InvalidConfigurationException(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT j = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue(); if (j < 1) { throw new InvalidConfigurationException(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT
String propertyType = property.getAttribute("type"); String propertyValue = property.getAttribute("value"); props.addProperty(new ConfigProperties.Property( propertyName, propertyType, ConfigProperties.Property.toObject(propertyType, propertyValue)));
propValue = propString.substring(sep2 + 1, propString .length()); properties.addProperty(new ConfigProperties.Property( propString.substring(0, sep1), propType, (propValue.equals("null") ? null : ConfigProperties.Property.toObject( propType, propValue)))); props = props.substring(propString.length() + 2);
try { addressRange = (String) properties.getProperty("addressRange").getValue(); host = (String) properties.getProperty("host").getValue(); password = (String) properties.getProperty("password").getValue(); systemId = (String) properties.getProperty("systemId").getValue(); systemType = (String) properties.getProperty("systemType").getValue(); binidType = BindType.getBindType((String) properties.getProperty("bindType").getValue()); } catch (Throwable e) { throw new InvalidConfigurationException(e.getMessage(), e);
public void raConfigure(ConfigProperties properties) { if (tracer.isFineEnabled()) { tracer.fine("Configuring RA Entity " + this.raContext.getEntityName()); } setAddressNpi((Integer) properties.getProperty("addressNpi").getValue()); setAddressRange((String) properties.getProperty("addressRange").getValue()); setAddressTon((Integer) properties.getProperty("addressTon").getValue()); setEnquireLinkTimeout((Integer) properties.getProperty("enquireLinkTimeout").getValue()); setHost((String) properties.getProperty("host").getValue()); setPassword((String) properties.getProperty("password").getValue()); setPort((Integer) properties.getProperty("port").getValue()); setSystemId((String) properties.getProperty("systemId").getValue()); setSystemType((String) properties.getProperty("systemType").getValue()); setBindType((String) properties.getProperty("bindType").getValue()); setSmppResponseReceivedTimeout((Integer) properties.getProperty("smppResponseReceivedTimeout").getValue()); setSmppResponseSentTimeout((Integer) properties.getProperty("smppResponseSentTimeout").getValue()); statsOn = (Boolean) properties.getProperty("statsOn").getValue(); if (tracer.isFineEnabled()) { StringBuffer sb = new StringBuffer(); sb.append("addressNpi = ").append(getAddressNpi()).append("\n").append("addressTon = ").append(getAddressTon()).append("\n") .append("addressRange = ").append(getAddressRange()).append("\n").append("host = ").append(getHost()).append("\n").append("port = ") .append(getPort()).append("\n").append("systemId = ").append(getSystemId()).append("\n").append("systemType = ").append(getSystemType()) .append("\n").append("password = ").append(getPassword()).append("\n").append("bindType = ").append(getBindType()).append("\n"); tracer.fine(sb.toString()); } }
public static ConfigProperties toProperties(PropertiesInfo propertiesInfo) throws ManagementConsoleException { ConfigProperties properties = new ConfigProperties(); for (String key : propertiesInfo.keySet()) { String[] nameAndType = key.split(" :: ", 2); // obtain a value depending on the type of property //String value = propertiesInfo.getProperty(key); Object value = propertiesInfo.getProperty(key); try { Class clazz = Class.forName(nameAndType[1]); Constructor con = clazz.getConstructor(String.class); value = con.newInstance((String)value); } catch (Exception e) { throw new ManagementConsoleException("Value of " + nameAndType[0] + " is not supported for type " + nameAndType[1] + "."); } Property property = new Property(nameAndType[0], nameAndType[1], value); properties.addProperty(property); } return properties; } }
@SuppressWarnings("unchecked") public void raConfigure(ConfigProperties properties) { String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY) .getValue(); if (!httpClientFactoryClassName.isEmpty()) { try { httpClientFactory = ((Class<? extends HttpAsyncClientFactory>) Class .forName(httpClientFactoryClassName)).newInstance(); } catch (Exception e) { tracer.severe("failed to load http client factory class", e); } } else { this.maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue(); this.defaultMaxPerRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE) .getValue(); this.connectTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue(); this.socketTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue(); } }
public void raVerifyConfiguration(ConfigProperties properties) throws InvalidConfigurationException { try { if (tracer.isInfoEnabled()) { tracer.info("Verifying configuring MAPRA: " + this.resourceAdaptorContext.getEntityName()); } this.mapJndi = (String) properties.getProperty(CONF_MAP_JNDI).getValue(); if (this.mapJndi == null) { throw new InvalidConfigurationException("MAP JNDI lookup name cannot be null"); } ss7RAExtInterface.onRaVerifyConfiguration(properties); } catch (Exception e) { throw new InvalidConfigurationException("Failed to test configuration options!", e); } if (tracer.isInfoEnabled()) { tracer.info("MAP Resource Adaptor configuration verified."); } }
public void raVerifyConfiguration(ConfigProperties properties) throws InvalidConfigurationException { try { if (tracer.isInfoEnabled()) { tracer.info("Verifying configuring MAPRA: " + this.resourceAdaptorContext.getEntityName()); } this.mapJndi = (String) properties.getProperty(CONF_MAP_JNDI).getValue(); if (this.mapJndi == null) { throw new InvalidConfigurationException("MAP JNDI lookup name cannot be null"); } } catch (Exception e) { throw new InvalidConfigurationException("Failed to test configuration options!", e); } if (tracer.isInfoEnabled()) { tracer.info("MAP Resource Adaptor configuration verified."); } }
public void raVerifyConfiguration(ConfigProperties properties) throws InvalidConfigurationException { try { if (tracer.isInfoEnabled()) { tracer.info("Verifying configuring TCAP RA: " + this.resourceAdaptorContext.getEntityName()); } this.tcapJndi = (String) properties.getProperty(CONF_TCAP_JNDI).getValue(); if (this.tcapJndi == null) { throw new InvalidConfigurationException("TCAP JNDI lookup name cannot be null"); } } catch (Exception e) { throw new InvalidConfigurationException("Failed to test configuration options!", e); } if (tracer.isInfoEnabled()) { tracer.info("TCAP Resource Adaptor configuration verified."); } }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(ACCT_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
/** * Creates an instance of the {@link ConfigProperties} for this component * * @return */ public ConfigProperties getDefaultConfigPropertiesInstance() { ConfigProperties defaultProperties = new ConfigProperties(); for (ConfigPropertyDescriptor mConfigProperty : getDescriptor().getConfigProperties()) { Object configPropertyValue = mConfigProperty.getConfigPropertyValue() == null ? null : ConfigProperties.Property.toObject(mConfigProperty.getConfigPropertyType(), mConfigProperty .getConfigPropertyValue()); defaultProperties.addProperty(new ConfigProperties.Property(mConfigProperty.getConfigPropertyName(), mConfigProperty.getConfigPropertyType(), configPropertyValue)); } return defaultProperties; }
public void raVerifyConfiguration(ConfigProperties properties) throws InvalidConfigurationException { try { if (tracer.isInfoEnabled()) { tracer.info("Verifying configuring CAP RA: " + this.resourceAdaptorContext.getEntityName()); } this.capJndi = (String) properties.getProperty(CONF_CAP_JNDI).getValue(); if (this.capJndi == null) { throw new InvalidConfigurationException("CAP JNDI lookup name cannot be null"); } } catch (Exception e) { throw new InvalidConfigurationException("Failed to test configuration options!", e); } }
public void raConfigure(ConfigProperties properties) { if (tracer.isFineEnabled()) { tracer.fine("Diameter CCA RA :: raConfigure"); } parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); Property dvtProp = properties.getProperty(DEFAULT_VALIDITY_TIME); defaultValidityTime = (Long) (dvtProp != null ? dvtProp.getValue() : defaultValidityTime); Property dttProp = properties.getProperty(DEFAULT_TX_TIMER_VALUE); defaultTxTimerValue = (Long) (dttProp != null ? dttProp.getValue() : defaultTxTimerValue); if(tracer.isInfoEnabled()) { tracer.info("Resource Adaptor Configured. Supported Applications: " + authApplicationIds); } }