congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
uk.gov.dstl.baleen.exceptions
Code IndexAdd Tabnine to your IDE (free)

How to use uk.gov.dstl.baleen.exceptions

Best Java code snippets using uk.gov.dstl.baleen.exceptions (Showing top 20 results out of 315)

origin: dstl/baleen

private void checkConfiguration(final Object[] keyValueConfiguration) throws BaleenException {
 if (keyValueConfiguration == null) {
  return;
 }
 if (keyValueConfiguration.length % 2 == 1) {
  throw new BaleenException(
    "Format is key,value,key,value must be an even number of entries in the array");
 }
}
origin: dstl/baleen

@SuppressWarnings("unchecked")
private List<String> yamlToList(Object yamlObject) throws InvalidParameterException {
 if (yamlObject == null) {
  return Collections.emptyList();
 } else if (yamlObject instanceof List) {
  return (List<String>) yamlObject;
 } else if (yamlObject instanceof String) {
  return Lists.newArrayList((String) yamlObject);
 } else {
  throw new InvalidParameterException("Unable to cast object to List<String>");
 }
}
origin: uk.gov.dstl.baleen/baleen-kafka

private void checkConfiguration(final Object[] keyValueConfiguration) throws BaleenException {
 if (keyValueConfiguration == null) {
  return;
 }
 if (keyValueConfiguration.length % 2 == 1) {
  throw new BaleenException(
    "Format is key,value,key,value must be an even number of entries in the array");
 }
}
origin: dstl/baleen

@Override
public void init(Resource connection, Map<String, Object> config) throws BaleenException {
 try {
  country = (SharedCountryResource) connection;
 } catch (ClassCastException cce) {
  throw new InvalidParameterException(
    "Unable to cast connection parameter to SharedCountryResource", cce);
 }
 super.init(connection, config);
}
origin: uk.gov.dstl.baleen/baleen-entity-linking

 @Override
 public void close() throws BaleenException {
  if (mongoFactory != null) {
   try {
    mongoFactory.close();
   } catch (Exception e) {
    throw new BaleenException(e);
   }
  }
 }
}
origin: uk.gov.dstl.baleen/baleen-resources

@Override
public void init(Resource connection, Map<String, Object> config) throws BaleenException {
 try {
  country = (SharedCountryResource) connection;
 } catch (ClassCastException cce) {
  throw new InvalidParameterException(
    "Unable to cast connection parameter to SharedCountryResource", cce);
 }
 super.init(connection, config);
}
origin: uk.gov.dstl.baleen/baleen-activemq

@Override
protected void createQueue() throws BaleenException {
 try {
  consumer = mqResource.createConsumer(topic, null);
 } catch (final JMSException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

private void control(BaleenPipeline pipeline, String command) throws InvalidParameterException {
 switch (command.toLowerCase()) {
  case "pause":
   pipeline.pause();
   break;
  case "unpause":
   pipeline.unpause();
   break;
  default:
   throw new InvalidParameterException("Unexpected command '" + command + "'");
 }
}
origin: uk.gov.dstl.baleen/baleen-rabbitmq

@Override
protected void createQueue() throws BaleenException {
 try {
  supplier = mqResource.createSupplier(exchangeName, routingKey, topic);
 } catch (final IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

@Override
protected void createQueue() throws BaleenException {
 try {
  consumer = mqResource.createConsumer(exchangeName, routingKey, topic);
 } catch (final IOException e) {
  throw new BaleenException(e);
 }
}
origin: uk.gov.dstl.baleen/baleen-rabbitmq

@Override
protected void createQueue() throws BaleenException {
 try {
  consumer = mqResource.createConsumer(exchangeName, routingKey, topic);
 } catch (final IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

@Override
protected void createQueue() throws BaleenException {
 try {
  consumer = mqResource.createConsumer(topic, null);
 } catch (final JMSException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

@Override
protected void createQueue() throws BaleenException {
 try {
  supplier = mqResource.createSupplier(exchangeName, routingKey, topic);
 } catch (final IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

 @Override
 public void close() throws BaleenException {
  if (mongoFactory != null) {
   try {
    mongoFactory.close();
   } catch (Exception e) {
    throw new BaleenException(e);
   }
  }
 }
}
origin: uk.gov.dstl.baleen/baleen-core

/**
 * Create a new pipeline from the provided YAML file, with the given name. If multiplicity is
 * greater than 1 names will be suffixed with '-n' for each multiple.
 */
public List<BaleenPipeline> create(String name, File file, int multiplicity)
  throws BaleenException {
 try {
  return create(name, new YamlPiplineConfiguration(file), multiplicity);
 } catch (IOException e) {
  throw new BaleenException(e);
 }
}
origin: uk.gov.dstl.baleen/baleen-core

/**
 * Create a new pipeline from the provided YAML, with the given name. If multiplicity is greater
 * than 1 names will be suffixed with '-n' for each multiple.
 */
public List<BaleenPipeline> create(String name, InputStream yaml, int multiplicity)
  throws BaleenException {
 try {
  return create(name, new YamlPiplineConfiguration(yaml), multiplicity);
 } catch (IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

/**
 * Create a new pipeline from the provided YAML, with the given name. If multiplicity is greater
 * than 1 names will be suffixed with '-n' for each multiple.
 */
public List<BaleenPipeline> create(String name, InputStream yaml, int multiplicity)
  throws BaleenException {
 try {
  return create(name, new YamlPipelineConfiguration(yaml), multiplicity);
 } catch (IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

/**
 * Create a new pipeline from the provided YAML file, with the given name. If multiplicity is
 * greater than 1 names will be suffixed with '-n' for each multiple.
 */
public List<BaleenPipeline> create(String name, File file, int multiplicity)
  throws BaleenException {
 try {
  return create(name, new YamlPipelineConfiguration(file), multiplicity);
 } catch (IOException e) {
  throw new BaleenException(e);
 }
}
origin: dstl/baleen

 @Override
 protected void initialize() throws BaleenException {
  super.initialize();
  throw new BaleenException("Testing");
 }
}
origin: dstl/baleen

 @Override
 protected InMemoryDocumentHistory loadExistingDocumentHistory(String documentId)
   throws BaleenException {
  loadCalled = true;
  if (throwException) {
   throw new BaleenException();
  } else if (returnNull) {
   return null;
  } else {
   return new InMemoryDocumentHistory(this, documentId);
  }
 }
}
uk.gov.dstl.baleen.exceptions

Most used classes

  • BaleenException
    A superclass for exceptions thrown by Baleen
  • InvalidParameterException
    Exception thrown when Baleen is given an invalid parameter. In general, code should assume a sensibl
  • BaleenExceptionTest
  • BaleenRuntimeException
    A superclass for runtime exceptions thrown by Baleen
  • MissingParameterException
    Exception thrown when Baleen is missing a required parameter. In general, code should assume a sensi
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now