Examples of InvalidParameterException


Examples of java.security.InvalidParameterException

   * @param oValue value to append
   * @param bBeginning true to add at the start, false to add at the end
   */
  public void append(final String sTagName, final Object oValue, final boolean bBeginning) {
    if (sTagName==null)
      throw new InvalidParameterException("Tag cannot be null"); //$NON-NLS-1$
   
    if (oValue==null || this.tp==null)
      return;

    final String sTag = StringFactory.get(sTagName);
View Full Code Here

Examples of java.security.InvalidParameterException

     * @return              a chunkified list (i.e., list of sublists)
     */
    public static <T> List<List<T>> chunkifyList(List<T> list, int maxChunkSize) {
        // sanity-check input param
        if (maxChunkSize < 1)
            throw new InvalidParameterException("maxChunkSize must be greater than zero");
       
        // initialize return object
        List<List<T>> chunkedLists = new ArrayList<List<T>>();
       
        // if the given list is smaller than the maxChunksize, there's
View Full Code Here

Examples of java.security.InvalidParameterException

                Series<Parameter> params = server.getContext().getParameters();
               
                if (endpoint.getProtocol().equals("https")) {
                    SSLContextParameters scp = endpoint.getSslContextParameters();
                    if (endpoint.getSslContextParameters() == null) {
                        throw new InvalidParameterException("Need to specify the SSLContextParameters option here!");
                    }
                    setupServerWithSSLContext(params, scp);
                }

                if (getControllerDaemon() != null) {
View Full Code Here

Examples of java.security.InvalidParameterException

                          int numRedirects,
                          String hostAddress){
        _payload = payload;
   
    if (baseUrl == null) {
          throw new InvalidParameterException("baseUrl cannot be null");
        }
       
        if (redirectedUrl == null) {
          throw new InvalidParameterException("redirectedUrl cannot be null");
        }
       
        if (headers == null) {
          throw new InvalidParameterException("headers cannot be null");
        }
       
        if (content == null) {
          throw new InvalidParameterException("content cannot be null");
        }
       
        if (contentType == null) {
            throw new InvalidParameterException("contentType cannot be null");
        }
       
        if (hostAddress == null) {
            throw new InvalidParameterException("hostAddress cannot be null");
        }
       
        _baseUrl = baseUrl;
        _fetchedUrl = redirectedUrl;
        _fetchTime = fetchTime;
View Full Code Here

Examples of java.security.InvalidParameterException

    }
   
    public void setMaxContentSize(String mimeType, int maxContentSize) {
        if  (   (_fetcherPolicy.getValidMimeTypes().size() > 0)
            &&  (!(_fetcherPolicy.getValidMimeTypes().contains(mimeType)))) {
            throw new InvalidParameterException(String.format("'%s' is not a supported MIME type", mimeType));
        }
        _maxContentSizes.put(mimeType, maxContentSize);
    }
View Full Code Here

Examples of java.security.InvalidParameterException

        this(DEFAULT_MIN_RESPONSE_RATE, DEFAULT_MAX_CONTENT_SIZE, DEFAULT_CRAWL_END_TIME, DEFAULT_CRAWL_DELAY, DEFAULT_MAX_REDIRECTS);
    }

    public FetcherPolicy(int minResponseRate, int maxContentSize, long crawlEndTime, long crawlDelay, int maxRedirects) {
        if (crawlDelay < 0) {
            throw new InvalidParameterException("crawlDelay must be >= 0: " + crawlDelay);
        }
       
        // Catch common error of specifying crawl delay in seconds versus milliseconds
        if ((crawlDelay < 100) && (crawlDelay != 0))  {
            throw new InvalidParameterException("crawlDelay must be milliseconds, not seconds: " + crawlDelay);
        }
       
        _minResponseRate = minResponseRate;
        _maxContentSize = maxContentSize;
        _crawlEndTime = crawlEndTime;
View Full Code Here

Examples of java.security.InvalidParameterException

        return _tupleEntry.getString(URL_FN);
    }

    public void setUrl(String baseUrl) {
        if (baseUrl == null) {
            throw new InvalidParameterException("baseUrl cannot be null");
        }

        _tupleEntry.setString(URL_FN, baseUrl);
    }
View Full Code Here

Examples of java.security.InvalidParameterException

        return _tupleEntry.getString(FETCHED_URL_FN);
    }

    public void setFetchedUrl(String fetchedUrl) {
        if (fetchedUrl == null) {
            throw new InvalidParameterException("fetchedUrl cannot be null");
        }

        _tupleEntry.setString(FETCHED_URL_FN, fetchedUrl);
    }
View Full Code Here

Examples of java.security.InvalidParameterException

        return ((ContentBytes)_tupleEntry.getObject(CONTENT_FN)).getLength();
    }
   
    public void setContent(ContentBytes content) {
        if (content == null) {
            throw new InvalidParameterException("content cannot be null");
        }

        _tupleEntry.setObject(CONTENT_FN, content);
    }
View Full Code Here

Examples of java.security.InvalidParameterException

        return _tupleEntry.getString(CONTENT_TYPE_FN);
    }

    public void setContentType(String contentType) {
        if (contentType == null) {
            throw new InvalidParameterException("contentType cannot be null");
        }

        _tupleEntry.setString(CONTENT_TYPE_FN, contentType);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.