io.vertx.lang.ruby

## Class JRubyVerticleFactory

- java.lang.Object
- - io.vertx.lang.ruby.JRubyVerticleFactory

- All Implemented Interfaces:
    VerticleFactory

      public class JRubyVerticleFactory
      extends Object
      implements VerticleFactory

  Author:
    Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRubyVerticleFactory()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `blockingCreate()` If the `VerticleFactory.createVerticle(String, ClassLoader)` method might be slow Vert.x will call it using a worker thread instead of an event loop if this returns true
    `Verticle` | `createVerticle(String verticleName, ClassLoader classLoader)` Create a verticle instance.
    `void` | `init(Vertx vertx)` Initialise the factory
    `String` | `prefix()`
    `static void` | `requireCallback(Runnable runnable)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.core.spi.VerticleFactory

      `close, order, removePrefix, requiresResolve, resolve`

- - ### Constructor Detail

    - #### JRubyVerticleFactory

          public JRubyVerticleFactory()

  - ### Method Detail

    - #### prefix

          public String prefix()

      Specified by:
        `prefix` in interface `VerticleFactory`
      Returns:
        The prefix for the factory, e.g. "java", or "js".

    - #### blockingCreate

          public boolean blockingCreate()

      Description copied from interface: `VerticleFactory`
      If the `VerticleFactory.createVerticle(String, ClassLoader)` method might be slow Vert.x will call it using a worker thread instead of an event loop if this returns true
      Specified by:
        `blockingCreate` in interface `VerticleFactory`
      Returns:
        true if `VerticleFactory.createVerticle(String, ClassLoader)` should be called on a worker thread.

    - #### init

          public void init(Vertx vertx)

      Description copied from interface: `VerticleFactory`
      Initialise the factory
      Specified by:
        `init` in interface `VerticleFactory`
      Parameters:
        `vertx` - The Vert.x instance

    - #### createVerticle

          public Verticle createVerticle(String verticleName,
                                         ClassLoader classLoader)
                                  throws Exception

      Description copied from interface: `VerticleFactory`
      Create a verticle instance. If this method is likely to be slow (e.g. Ruby or JS verticles which might have to start up a language engine) then make sure it is run on a worker thread by returning `true` from `VerticleFactory.blockingCreate()`.
      Specified by:
        `createVerticle` in interface `VerticleFactory`
      Parameters:
        `verticleName` - The verticle name
        `classLoader` - The class loader
      Returns:
        The instance
      Throws:
        `Exception`

    - #### requireCallback

          public static void requireCallback(Runnable runnable)

Copyright © 2017. All rights reserved.