Tabnine Logo
InternalVertxJerseyBinder.bind
Code IndexAdd Tabnine to your IDE (free)

How to use
bind
method
in
com.englishtown.vertx.jersey.inject.InternalVertxJerseyBinder

Best Java code snippets using com.englishtown.vertx.jersey.inject.InternalVertxJerseyBinder.bind (Showing top 4 results out of 315)

origin: com.englishtown/vertx-mod-jersey

  /**
   * Implement to provide binding definitions using the exposed binding
   * methods.
   */
  @Override
  protected void configure() {

    // Bind the vertx and container instances
    bind(vertx).to(Vertx.class);
    bind(container).to(Container.class);

    // Request and read stream
    bindFactory(VertxRequestReferencingFactory.class).to(HttpServerRequest.class).in(PerLookup.class);
    bindFactory(VertxRequestReferencingFactory.class).to(new TypeLiteral<ReadStream<HttpServerRequest>>() {
    }).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerRequest>referenceFactory()).to(new TypeLiteral<Ref<HttpServerRequest>>() {
    }).in(RequestScoped.class);

    // Response
    bindFactory(VertxResponseReferencingFactory.class).to(HttpServerResponse.class).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerResponse>referenceFactory()).to(new TypeLiteral<Ref<HttpServerResponse>>() {
    }).in(RequestScoped.class);

  }
}
origin: ef-labs/vertx-jersey

@Test
public void testConfigure() throws Exception {
  InternalVertxJerseyBinder binder = new InternalVertxJerseyBinder(mock(Vertx.class));
  DynamicConfiguration dynamicConfiguration = mock(DynamicConfiguration.class);
  binder.bind(dynamicConfiguration);
}
origin: com.englishtown.vertx/vertx-jersey

  /**
   * Implement to provide binding definitions using the exposed binding
   * methods.
   */
  @Override
  protected void configure() {

    // Bind the vertx and container instances
    bind(vertx).to(Vertx.class);

    // Request and read stream
    bindFactory(VertxRequestReferencingFactory.class).to(HttpServerRequest.class).in(PerLookup.class);
    bindFactory(VertxRequestReferencingFactory.class).to(new TypeLiteral<ReadStream<HttpServerRequest>>() {
    }).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerRequest>referenceFactory()).to(new TypeLiteral<Ref<HttpServerRequest>>() {
    }).in(RequestScoped.class);

    // Response
    bindFactory(VertxResponseReferencingFactory.class).to(HttpServerResponse.class).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerResponse>referenceFactory()).to(new TypeLiteral<Ref<HttpServerResponse>>() {
    }).in(RequestScoped.class);

  }
}
origin: ef-labs/vertx-jersey

  /**
   * Implement to provide binding definitions using the exposed binding
   * methods.
   */
  @Override
  protected void configure() {

    // Bind the vertx and container instances
    bind(vertx).to(Vertx.class);

    // Request and read stream
    bindFactory(VertxRequestReferencingFactory.class).to(HttpServerRequest.class).in(PerLookup.class);
    bindFactory(VertxRequestReferencingFactory.class).to(new TypeLiteral<ReadStream<HttpServerRequest>>() {
    }).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerRequest>referenceFactory()).to(new TypeLiteral<Ref<HttpServerRequest>>() {
    }).in(RequestScoped.class);

    // Response
    bindFactory(VertxResponseReferencingFactory.class).to(HttpServerResponse.class).in(PerLookup.class);
    bindFactory(ReferencingFactory.<HttpServerResponse>referenceFactory()).to(new TypeLiteral<Ref<HttpServerResponse>>() {
    }).in(RequestScoped.class);

  }
}
com.englishtown.vertx.jersey.injectInternalVertxJerseyBinderbind

Popular methods of InternalVertxJerseyBinder

  • <init>
  • bindFactory

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
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