Package org.serviceconnector.cmd

Examples of org.serviceconnector.cmd.SCMPValidatorException


      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here


      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

    try {
      // add environment variables to configuration
      AppContext.apacheCompositeConfig.addConfiguration(new EnvironmentConfiguration());
      AppContext.apacheCompositeConfig.addConfiguration(new PropertiesConfiguration(configFile));
    } catch (Exception e) {
      throw new SCMPValidatorException(SCMPError.V_WRONG_CONFIGURATION_FILE, e.toString());
    }
  }
View Full Code Here

      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

      // needs to set message type at this point
      ex.setMessageType(getKey());
      throw ex;
    } catch (Throwable th) {
      LOGGER.error("validation error", th);
      SCMPValidatorException validatorException = new SCMPValidatorException();
      validatorException.setMessageType(getKey());
      throw validatorException;
    }
  }
View Full Code Here

  public synchronized void startListener() throws SCServiceException, SCMPValidatorException {
    if (this.listening == true) {
      throw new SCServiceException("Listener is already started not allowed to start again.");
    }
    if (this.scHost == null) {
      throw new SCMPValidatorException("Host must be set.");
    }
    if (this.connectionType == null) {
      throw new SCMPValidatorException("ConnectionType must be set.");
    }
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, this.scPort, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, this.listenerPort, Constants.MAX_PORT_VALUE,
        SCMPError.HV_WRONG_PORTNR);

    if (this.scPort == this.listenerPort) {
      throw new SCMPValidatorException("SC port and listener port must not be the same.");
    }

    if (this.nics == null || this.nics.size() == 0) {
      nics = new ArrayList<String>();
      try {
        Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
        for (NetworkInterface netint : Collections.list(nets)) {
          Enumeration<InetAddress> inetAdresses = netint.getInetAddresses();
          for (InetAddress inetAddress : Collections.list(inetAdresses)) {
            if (inetAddress instanceof Inet6Address) {
              // ignore IPV6 addresses, bind not possible on this NIC
              continue;
            }
            nics.add(inetAddress.getHostAddress());
            LOGGER.debug("SCServer listens on " + inetAddress.getHostAddress());
          }
        }
      } catch (Exception e) {
        LOGGER.fatal("unable to detect network interface", e);
        throw new SCMPValidatorException(SCMPError.V_WRONG_CONFIGURATION_FILE, "Wrong interface.");
      }
    }

    ListenerConfiguration listenerConfig = new ListenerConfiguration(SCSessionServer.class.getSimpleName());
    listenerConfig.setConnectionType(this.connectionType.getValue());
View Full Code Here

  public SCSessionServer newSessionServer(String serviceName) throws SCServiceException, SCMPValidatorException {
    if (this.listening == false) {
      throw new SCServiceException("NewSessionServer not possible - server not listening.");
    }
    if (serviceName == null) {
      throw new SCMPValidatorException("service name must be set");
    }
    return new SCSessionServer(this, serviceName, requester);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.cmd.SCMPValidatorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.