protected IConnector getConnector(IManagedContainer container, String description) {
    int pos = description.indexOf(SCHEME_SEPARATOR);
    if (pos == -1) {
      throw new IllegalArgumentException("Invalid URI: " + description);
    }

    String factoryType = description.substring(0, pos);
    if (StringUtil.isEmpty(factoryType)) {
      throw new IllegalArgumentException("Invalid URI: " + description);
    }

    String connectorDescription = description.substring(pos + SCHEME_SEPARATOR.length());
    if (StringUtil.isEmpty(connectorDescription)) {
      throw new IllegalArgumentException("Invalid URI: " + description);
    }

    pos = connectorDescription.indexOf('?');
    if (pos != -1) {
      connectorDescription = connectorDescription.substring(0, pos);
    }

    return (IConnector)
        container.getElement(ConnectorFactory.PRODUCT_GROUP, factoryType, connectorDescription);
  }
Beispiel #2
0
 public FailoverMonitor getFailoverMonitor(String group) {
   return (FailoverMonitor) container.getElement(FailoverMonitor.PRODUCT_GROUP, "net4j", group);
 }
Beispiel #3
0
 public Object getResultElement() {
   return container.getElement(productGroup, factoryType, resultDescription);
 }
Beispiel #4
0
 public static IJVMConnector getConnector(IManagedContainer container, String description) {
   return (IJVMConnector)
       container.getElement(
           JVMConnectorFactory.PRODUCT_GROUP, JVMConnectorFactory.TYPE, description);
 }
Beispiel #5
0
 protected ExecutorService getExecutorService(IManagedContainer container) {
   return (ExecutorService)
       container.getElement(
           ExecutorServiceFactory.PRODUCT_GROUP, ExecutorServiceFactory.TYPE, null);
 }
Beispiel #6
0
 /** @since 2.0 */
 protected IBufferProvider getBufferProvider(IManagedContainer container) {
   return (IBufferProvider)
       container.getElement(BufferProviderFactory.PRODUCT_GROUP, BufferProviderFactory.TYPE, null);
 }