protected CxfEndpoint createCxfSpringEndpoint(String beanId) throws Exception { return CamelContextHelper.mandatoryLookup(getCamelContext(), beanId, CxfEndpoint.class); }
@Override protected void doStart() throws Exception { influxDB = CamelContextHelper.mandatoryLookup(getCamelContext(), connectionBean, InfluxDB.class); LOG.debug("Resolved the connection with the name {} as {}", connectionBean, influxDB); super.doStart(); }
private void addEndpointDispatcherToConfiguration(SpringWebserviceConfiguration configuration, String lookupKey) { // Obtain CamelEndpointDispatcher with the given name from registry CamelEndpointDispatcher endpoint = CamelContextHelper.mandatoryLookup(getCamelContext(), lookupKey, CamelEndpointDispatcher.class); configuration.setEndpointDispatcher(endpoint); }
@Override protected void doStart() throws Exception { if (writeConcern != null && writeConcernRef != null) { String msg = "Cannot set both writeConcern and writeConcernRef at the same time. Respective values: " + writeConcern + ", " + writeConcernRef + ". Aborting initialization."; throw new IllegalArgumentException(msg); } mongoConnection = CamelContextHelper.mandatoryLookup(getCamelContext(), connectionBean, MongoClient.class); LOG.debug("Resolved the connection with the name {} as {}", connectionBean, mongoConnection); setWriteReadOptionsOnConnection(); super.doStart(); }
/** * Applies validation logic specific to this endpoint type. If everything succeeds, continues initialization */ @Override protected void doStart() throws Exception { if (writeConcern != null && writeConcernRef != null) { String msg = "Cannot set both writeConcern and writeConcernRef at the same time. Respective values: " + writeConcern + ", " + writeConcernRef + ". Aborting initialization."; throw new IllegalArgumentException(msg); } mongoConnection = CamelContextHelper.mandatoryLookup(getCamelContext(), connectionBean, MongoClient.class); LOG.debug("Resolved the connection with the name {} as {}", connectionBean, mongoConnection); setWriteReadOptionsOnConnection(); super.doStart(); }
@SuppressWarnings("unchecked") public void init() { Object obj = CamelContextHelper.mandatoryLookup(getCamelContext(), getEndpointUri());
Object o = CamelContextHelper.mandatoryLookup(camelContext, name); serverBootstrap.option(option, o); } else {
Object o = CamelContextHelper.mandatoryLookup(camelContext, name); bootstrap.option(option, o); } else {
target = CamelContextHelper.mandatoryLookup(getCamelContext(), dataSourceRef, DataSource.class);
AbstractJAXRSFactoryBean bean = CamelContextHelper.mandatoryLookup(getCamelContext(), beanId, AbstractJAXRSFactoryBean.class); if (bean instanceof BlueprintSupport) {
@Override @SuppressWarnings("unchecked") protected void doStart() throws Exception { ObjectHelper.notNull(camelContext, "CamelContext"); if (context == null) { // if context not injected, create one and resolve partial class up front so they are ready to be used context = createContext(); } introspector = context.createJAXBIntrospector(); if (partClass != null) { partialClass = camelContext.getClassResolver().resolveMandatoryClass(partClass, Object.class); } if (namespacePrefixRef != null) { namespacePrefix = CamelContextHelper.mandatoryLookup(camelContext, namespacePrefixRef, Map.class); } if (namespacePrefix != null) { namespacePrefixMapper = NamespacePrefixMapperFactory.newNamespacePrefixMapper(camelContext, namespacePrefix); } typeConverter = camelContext.getTypeConverter(); if (schema != null) { cachedSchema = createSchema(getSources()); } LOG.debug("JaxbDataFormat [prettyPrint={}, objectFactory={}]", prettyPrint, objectFactory); }
@Override protected void doStart() throws Exception { super.doStart(); // we can get the cluster using various ways if (cluster == null && beanRef != null) { Object bean = CamelContextHelper.mandatoryLookup(getCamelContext(), beanRef); if (bean instanceof Session) { session = (Session) bean; cluster = session.getCluster(); keyspace = session.getLoggedKeyspace(); } else if (bean instanceof Cluster) { cluster = (Cluster) bean; session = null; } else { throw new IllegalArgumentException("CQL Bean type should be of type Session or Cluster but was " + bean); } } if (cluster == null && hosts != null) { // use the cluster builder to create the cluster cluster = createClusterBuilder().build(); } if (cluster != null) { sessionHolder = new CassandraSessionHolder(cluster, keyspace); } else { sessionHolder = new CassandraSessionHolder(session); } sessionHolder.start(); }
target = CamelContextHelper.mandatoryLookup(getCamelContext(), dataSourceRef, DataSource.class);
if (ref != null) { restletBinding = CamelContextHelper.mandatoryLookup(getCamelContext(), ref, ResourceBinding.class);