Class: VertxAuthJdbc::JDBCAuthorization

Inherits:
VertxAuthCommon::AuthorizationProvider show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb

Overview

Factory interface for creating instances that use the Vert.x JDBC client.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Methods inherited from VertxAuthCommon::AuthorizationProvider

#get_authorizations, #get_id

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


21
22
23
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 21

def @@j_api_type.accept?(obj)
  obj.class == JDBCAuthorization
end

+ (::VertxAuthJdbc::JDBCAuthorization) create(providerId, client, options)

Create a JDBC authorization provider implementation

Parameters:

  • providerId (String)
    the provider id
  • client (::VertxJdbc::JDBCClient)
    the JDBC client instance
  • options (Hash{String => Object})
    the => Object}

Returns:



42
43
44
45
46
47
48
49
50
51
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 42

def self.create(*args)
  if args[0].class == String && args[1].class.method_defined?(:j_del) && args[2].class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthJdbc::JDBCAuthorization.java_method(:create, [Java::java.lang.String.java_class,Java::IoVertxExtJdbc::JDBCClient.java_class,Java::IoVertxExtAuthJdbc::JDBCAuthorizationOptions.java_class]).call(args[0],args[1].j_del,Java::IoVertxExtAuthJdbc::JDBCAuthorizationOptions.new(::Vertx::Util::Utils.to_json_object(args[2]))),::VertxAuthJdbc::JDBCAuthorization)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]},#{args[2]})"
  end
end

+ (Object) j_api_type



30
31
32
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 30

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



33
34
35
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 33

def self.j_class
  Java::IoVertxExtAuthJdbc::JDBCAuthorization.java_class
end

+ (Object) unwrap(obj)



27
28
29
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 27

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



24
25
26
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-jdbc/jdbc_authorization.rb', line 24

def @@j_api_type.wrap(obj)
  JDBCAuthorization.new(obj)
end