Package by.stub.exception

Examples of by.stub.exception.Stubby4JException


      } catch (final ParseException ex) {
         final String msg =
            String.format("Could not parse provided command line arguments, error: %s",
               ex.toString());

         throw new Stubby4JException(msg);
      }
   }
View Full Code Here


      final String msg =
         String.format("YAML data was not provided using command line option '--%s'. %s"
            + "To see all command line options run again with option '--%s'",
            CommandLineInterpreter.OPTION_CONFIG, BR, CommandLineInterpreter.OPTION_HELP);

      throw new Stubby4JException(msg);
   }
View Full Code Here

      } catch (final Exception ex) {
         final String msg =
            String.format("Could not init stubby4j, error: %s", ex.toString());

         throw new Stubby4JException(msg, ex);
      }
   }
View Full Code Here

                                     final String post,
                                     final Map<String, String> headers,
                                     final int postLength) throws IOException {

      if (!SUPPORTED_METHODS.contains(method)) {
         throw new Stubby4JException(String.format("HTTP method '%s' not supported when contacting stubby4j", method));
      }

      final URL url = new URL(fullUrl);
      final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
View Full Code Here

   public static String getHtmlResourceByName(final String templateSuffix) {
      final String htmlTemplatePath = String.format("/ui/html/%s.html", templateSuffix);
      final InputStream inputStream = HandlerUtils.class.getResourceAsStream(htmlTemplatePath);
      if (ObjectUtils.isNull(inputStream)) {
         throw new Stubby4JException(String.format("Could not find resource %s", htmlTemplatePath));
      }
      return StringUtils.inputStreamToString(inputStream);
   }
View Full Code Here

   private void relaxSslTrustManager() {
      try {
         new FakeX509TrustManager().allowAllSSL();
      } catch (final Exception ex) {
         throw new Stubby4JException(ex.toString(), ex);
      }
   }
View Full Code Here

   private void relaxSslTrustManager() {
      try {
         new FakeX509TrustManager().allowAllSSL();
      } catch (final Exception ex) {
         throw new Stubby4JException(ex.toString(), ex);
      }
   }
View Full Code Here

   }

   HttpURLConnection constructHttpConnection() throws IOException {

      if (!isMethodSupported(clientHttpRequest.getMethod())) {
         throw new Stubby4JException(String.format("HTTP method '%s' not supported when contacting stubby4j", clientHttpRequest.getMethod()));
      }

      final URL url = new URL(constructUrlFromClientRequest());
      final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
View Full Code Here

   }

   HttpURLConnection constructHttpConnection() throws IOException {

      if (!isMethodSupported(clientHttpRequest.getMethod())) {
         throw new Stubby4JException(String.format("HTTP method '%s' not supported when contacting stubby4j", clientHttpRequest.getMethod()));
      }

      final URL url = new URL(constructUrlFromClientRequest());
      final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
View Full Code Here

      } catch (final ParseException ex) {
         final String msg =
            String.format("Could not parse provided command line arguments, error: %s",
               ex.toString());

         throw new Stubby4JException(msg);
      }
   }
View Full Code Here

TOP

Related Classes of by.stub.exception.Stubby4JException

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.