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

    // 1. checking preconditions and validate
    if (this.attached) {
      throw new SCServiceException("SCClient already attached.");
    }
    if (host == null) {
      throw new SCMPValidatorException("Host is missing.");
    }
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, this.port, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    // 2. initialize call & invoke
    synchronized (AppContext.communicatorsLock) {
      AppContext.init();
View Full Code Here

  public SCFileService newFileService(String serviceName) throws SCServiceException, SCMPValidatorException {
    if (this.attached == false) {
      throw new SCServiceException("Creating a new file service not possible - client not attached.");
    }
    if (serviceName == null) {
      throw new SCMPValidatorException("Service name must be set.");
    }
    ValidatorUtility
        .validateStringLengthTrim(1, serviceName, Constants.MAX_LENGTH_SERVICENAME, SCMPError.HV_WRONG_SERVICE_NAME);
    return new SCFileService(this, serviceName, this.requester);
  }
View Full Code Here

  public SCSessionService newSessionService(String serviceName) throws SCServiceException, SCMPValidatorException {
    if (this.attached == false) {
      throw new SCServiceException("Creating a new session service not possible - client not attached.");
    }
    if (serviceName == null) {
      throw new SCMPValidatorException("Service name must be set.");
    }
    ValidatorUtility
        .validateStringLengthTrim(1, serviceName, Constants.MAX_LENGTH_SERVICENAME, SCMPError.HV_WRONG_SERVICE_NAME);
    return new SCSessionService(this, serviceName, this.requester);
  }
View Full Code Here

  public SCPublishService newPublishService(String serviceName) throws SCServiceException, SCMPValidatorException {
    if (this.attached == false) {
      throw new SCServiceException("Creating a new publish service not possible - client not attached.");
    }
    if (serviceName == null) {
      throw new SCMPValidatorException("Service name must be set.");
    }
    ValidatorUtility
        .validateStringLengthTrim(1, serviceName, Constants.MAX_LENGTH_SERVICENAME, SCMPError.HV_WRONG_SERVICE_NAME);
    return new SCPublishService(this, serviceName, this.requester);
  }
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

    int keepAliveOTISeconds = Integer.parseInt(context.getInitParameter(WebConstants.PROPERTY_KEEPALIVE_OTI));
    this.checkRegistrationIntervalSeconds = Integer.parseInt(context
        .getInitParameter(WebConstants.PROPERTY_CHECK_REGRISTRATION_INTERVAL));

    if (scHost == null) {
      throw new SCMPValidatorException("Host must be set.");
    }
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, scPort, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    ValidatorUtility
        .validateInt(Constants.MIN_PORT_VALUE, this.tomcatPort, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    if (scPort == this.tomcatPort) {
      throw new SCMPValidatorException("SC port and tomcat port must not be the same.");
    }
    // init the requester to communicate to SC
    RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(remotNodeName, scHost, scPort,
        ConnectionType.NETTY_HTTP.getValue(), keepAliveIntervalToSCSeconds, checkRegistrationIntervalSeconds, 1);
    this.requester = new SCRequester(remoteNodeConf, keepAliveOTISeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

        break;
      case WEB_SERVER:
        // nothing to do in case of a web server is registered in specific endpoint
        continue;
      default:
        throw new SCMPValidatorException(SCMPError.V_WRONG_CONFIGURATION_FILE, "wrong serverType, serverName/serverType="
            + remoteNodeConfiguration.getName() + Constants.SLASH + serverType);
      }
      AppContext.getServerRegistry().addServer(server.getServerKey(), server);
    }
  }
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.