Examples of context()


Examples of org.apache.camel.PropertyInject.context()

            Class<?> clazz = bean.getClass();
            do {
                Field[] fields = clazz.getDeclaredFields();
                for (Field field : fields) {
                    PropertyInject propertyInject = field.getAnnotation(PropertyInject.class);
                    if (propertyInject != null && matchContext(propertyInject.context())) {
                        injectFieldProperty(field, propertyInject.value(), propertyInject.defaultValue(), bean, beanName);
                    }

                    EndpointInject endpointInject = field.getAnnotation(EndpointInject.class);
                    if (endpointInject != null && matchContext(endpointInject.context())) {
View Full Code Here

Examples of org.apache.camel.PropertyInject.context()

            } while (clazz != null && clazz != Object.class);
        }

        protected void setterInjection(Method method, Object bean, String beanName) {
            PropertyInject propertyInject = method.getAnnotation(PropertyInject.class);
            if (propertyInject != null && matchContext(propertyInject.context())) {
                setterPropertyInjection(method, propertyInject.value(), propertyInject.defaultValue(), bean, beanName);
            }

            EndpointInject endpointInject = method.getAnnotation(EndpointInject.class);
            if (endpointInject != null && matchContext(endpointInject.context())) {
View Full Code Here

Examples of org.apache.camel.cdi.Mock.context()

        ObjectHelper.notNull(annotation, "Should be annotated with @Mock");
        String uri = annotation.value();
        if (ObjectHelper.isEmpty(uri)) {
            uri = "mock:" + point.getMember().getName();
        }
        return CamelContextHelper.getMandatoryEndpoint(getCamelContext(point, annotation.context()), uri, MockEndpoint.class);
    }

    @Produces
    @Uri("")
    public Endpoint createEndpoint(InjectionPoint point) {
View Full Code Here

Examples of org.apache.camel.cdi.Uri.context()

    @Uri("")
    public Endpoint createEndpoint(InjectionPoint point) {
        Annotated annotated = point.getAnnotated();
        Uri uri = annotated.getAnnotation(Uri.class);
        ObjectHelper.notNull(uri, "Should be annotated with @Uri");
        return CamelContextHelper.getMandatoryEndpoint(getCamelContext(point, uri.context()), uri.value());
    }

    @Produces
    @Uri("")
    public ProducerTemplate createProducerTemplate(InjectionPoint point) {
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.context()

    // set expectations
    expect(configuration.getParent()).andReturn(null);
    expect(configuration.getPrefix()).andReturn("prefix");
    expect(configuration.getString("databaseUrl")).andReturn("url");

    expect(record.context()).andReturn("context");
    expect(record.name()).andReturn("typeName");
    expect(record.tags()).andReturn(new HashSet<MetricsTag>());
    expect(record.timestamp()).andReturn(9999L);

    expect(record.metrics()).andReturn(Collections.singleton(metric));
View Full Code Here

Examples of org.apache.hadoop.metrics2.annotation.Metrics.context()

        Metrics ma = (Metrics) annotation;
        info = factory.getInfo(cls, ma);
        if (r == null) {
          r = new MetricsRegistry(info);
        }
        r.setContext(ma.context());
      }
    }
    if (r == null) return new MetricsRegistry(cls.getSimpleName());
    return r;
  }
View Full Code Here

Examples of org.apache.tuscany.api.annotation.DataType.context()

                                  Map<String, Operation<Type>> operations) {
        DataType interfaceDataType = clazz.getAnnotation(DataType.class);
        if (interfaceDataType != null) {
            contract.setDataBinding(interfaceDataType.name());
            // FIXME: [rfeng] Keep data context as metadata?
            for (DataContext c : interfaceDataType.context()) {
                contract.setMetaData(c.key(), c.value());
            }
        }
        for (Method method : clazz.getMethods()) {
            Operation<?> operation = operations.get(method.getName());
View Full Code Here

Examples of org.chromium.sdk.internal.v8native.protocol.input.data.ScriptHandle.context()

    } catch (JsonProtocolParseException e) {
      throw new RuntimeException(e);
    }
    ScriptHandle script = body.script();
    if (V8Helper.JAVASCRIPT_VOID.equals(script.sourceStart()) ||
        script.context() == null ||
        V8ProtocolUtil.getScriptType(script.scriptType()) ==
            Script.Type.NATIVE) {
      return null;
    }
    return V8ProtocolUtil.validScript(script, eventResponse.refs(), contextFilter);
View Full Code Here

Examples of org.hibernate.ogm.options.spi.OptionsService.context()

  public void configure(Map configurationValues) {
    OptionsService optionsService = serviceRegistry.getService( OptionsService.class );
    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, classLoaderService );

    this.config = new MongoDBConfiguration( propertyReader, optionsService.context().getGlobalOptions() );
  }

  @Override
  public void injectServices(ServiceRegistryImplementor serviceRegistry) {
    this.serviceRegistry = serviceRegistry;
View Full Code Here

Examples of org.hibernate.ogm.options.spi.OptionsService.context()

  public void configure(Map configurationValues) {
    OptionsService optionsService = serviceRegistry.getService( OptionsService.class );
    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, classLoaderService );

    this.config = new MongoDBConfiguration( propertyReader, optionsService.context().getGlobalOptions() );
  }

  @Override
  public void injectServices(ServiceRegistryImplementor serviceRegistry) {
    this.serviceRegistry = serviceRegistry;
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.