Qore jni Module 2.6.0
Loading...
Searching...
No Matches
KafkaDataProvider::KafkaConnection Class Reference

Class for Kafka connections. More...

#include <KafkaConnection.qc.dox.h>

Inherits ConnectionProvider::AbstractConnectionWithInfo.

Public Member Methods

void constructor (string url, hash< auto > attr, string name, string desc, hash< auto > options, soft< LoggerInterface > logger)
 Creates the object from the arguments.
 
void constructor (hash< auto > config, soft< hash< auto > > attr)
 Creates the object from the arguments.
 
string getType ()
 returns the string type name for the connection object
 
bool hasDataProvider ()
 Returns True, as this connection class returns a data provider with the getDataProvider method.
 
soft< string > getAppName ()
 Returns the data provider application name this connection serves.
 
AbstractDataProvider getDataProvider (soft< hash< auto > > constructor_options)
 Returns a KafkaDataProvider object for this connection.
 
hash< auto > getKafkaOptions ()
 Returns options that can be used to create Kafka data providers.
 
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl ()
 Returns the ConnectionSchemeInfo hash for this object.
 
void setChildCapabilities ()
 Returns a hash of data provider constructor option info, if applicable.
 
KafkaConnectionWrapper getImpl (bool connect, soft< hash< auto > > rtopts)
 this method must return the connection object corresponding to the object's configuration
 
void setRealUrl (soft< string > url)
 Called by the constructor to set the real URL.
 

Public Attributes

const auto ConnectionScheme = ...
 Connection entry info.
 

Detailed Description

Class for Kafka connections.

Member Function Documentation

◆ constructor()

void KafkaDataProvider::KafkaConnection::constructor ( hash< auto >  config,
soft< hash< auto > >  attr 
)

Creates the object from the arguments.

Parameters
configwith the following keys:
  • name (required string): the connection name
  • display_name (optional string): the display name
  • short_desc (optional string): a short description in plain text
  • desc (optional string): a long description with markdown formatting
  • url (required string): the connection URL
  • opts (optional hash): connection options
  • logger (optional LoggerInterface object): logger for the connection
attroptional connection attributes
  • monitor (optional bool): should the connection be monitored? Default: True
  • enabled (optional bool): is the connection enabled? Default: True
  • locked (optional bool): is the connection locked? Default: False
  • debug_data (optional bool): debug data? Default: False
  • tags (optional hash): tags for the connection; no default value
Exceptions
CONNECTION-OPTION-ERRORmissing or invalid connection option or attribute

◆ getAppName()

soft< string > KafkaDataProvider::KafkaConnection::getAppName ( )

Returns the data provider application name this connection serves.

Returns
the data provider application name this connection serves

◆ getDataProvider()

AbstractDataProvider KafkaDataProvider::KafkaConnection::getDataProvider ( soft< hash< auto > >  constructor_options)

Returns a KafkaDataProvider object for this connection.

Parameters
constructor_optionsany additional constructor options for the data provider
Returns
a data provider object for this connection, if supported

◆ getImpl()

KafkaConnectionWrapper KafkaDataProvider::KafkaConnection::getImpl ( bool  connect,
soft< hash< auto > >  rtopts 
)

this method must return the connection object corresponding to the object's configuration

Parameters
connectif True then the connection should be returned connected (and if possible a round-trip "ping" of the server should be made)
rtoptsoptions to override connection options
Returns
the connection object

◆ hasDataProvider()

bool KafkaDataProvider::KafkaConnection::hasDataProvider ( )

Returns True, as this connection class returns a data provider with the getDataProvider method.

Returns
True, as this connection class returns a data provider with the getDataProvider method
See also
getDataProvider

◆ setChildCapabilities()

void KafkaDataProvider::KafkaConnection::setChildCapabilities ( )

Returns a hash of data provider constructor option info, if applicable.

Returns
a hash of data provider constructor option info for the primary data provider, if applicable Override to set child data provider capabilities once per child class

◆ setRealUrl()

void KafkaDataProvider::KafkaConnection::setRealUrl ( soft< string >  url)

Called by the constructor to set the real URL.

@path the new URL

Sets the real Kafka URL in host:port format


The documentation for this class was generated from the following file: