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

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • 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