Table of Contents

Class Serializer<T>

Namespace
Org.Apache.Kafka.Common.Serialization
Assembly
MASES.KNet.dll

Listener for Kafka Serializer. Extends JVMBridgeListener. Implements ISerializer<T>

public class Serializer<T> : JVMBridgeListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, ISerializer<T>, ISerializer, IJVMBridgeBase, IJVMBridgeDefinition

Type Parameters

T
Inheritance
Serializer<T>
Implements
Derived
Inherited Members

Remarks

Dispose the object to avoid a resource leak, the object contains a reference to the corresponding JVM object

Constructors

Serializer()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public Serializer()

Serializer(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public Serializer(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

OnClose

public Action OnClose { get; set; }

Property Value

Action

Remarks

If OnClose has a value it takes precedence over corresponding class method

OnConfigure

public Action<Map<String, object>, bool> OnConfigure { get; set; }

Property Value

Action<Map<String, object>, bool>

Remarks

If OnConfigure has a value it takes precedence over corresponding class method

OnSerialize

public Func<String, T, byte[]> OnSerialize { get; set; }

Property Value

Func<String, T, byte[]>

Remarks

If OnSerialize has a value it takes precedence over corresponding class method

OnSerialize3

public Func<String, Headers, T, byte[]> OnSerialize3 { get; set; }

Property Value

Func<String, Headers, T, byte[]>

Remarks

If OnSerialize3 has a value it takes precedence over corresponding class method

Methods

Close()

public virtual void Close()

Remarks

The method invokes the default implementation in the JVM interface using CloseDefault(); override the method to implement a different behavior

CloseDefault()

public void CloseDefault()

Remarks

The method invokes the default implementation in the JVM interface

Configure(Map<String, object>, bool)

public virtual void Configure(Map<String, object> arg0, bool arg1)

Parameters

arg0 Map<String, object>

Map

arg1 bool

bool

Remarks

The method invokes the default implementation in the JVM interface using ConfigureDefault(Map<String, object>, bool); override the method to implement a different behavior

ConfigureDefault(Map<String, object>, bool)

public void ConfigureDefault(Map<String, object> arg0, bool arg1)

Parameters

arg0 Map<String, object>

Map

arg1 bool

bool

Remarks

The method invokes the default implementation in the JVM interface

InitializeHandlers()

Handlers initializer for Serializer

protected virtual void InitializeHandlers()

Serialize(String, Headers, T)

public virtual byte[] Serialize(String arg0, Headers arg1, T arg2)

Parameters

arg0 String

String

arg1 Headers

Headers

arg2 T

T

Returns

byte[]

byte

Remarks

The method invokes the default implementation in the JVM interface using SerializeDefault(String, Headers, T); override the method to implement a different behavior

Serialize(String, T)

public virtual byte[] Serialize(String arg0, T arg1)

Parameters

arg0 String

String

arg1 T

T

Returns

byte[]

byte

SerializeDefault(String, Headers, T)

public byte[] SerializeDefault(String arg0, Headers arg1, T arg2)

Parameters

arg0 String

String

arg1 Headers

Headers

arg2 T

T

Returns

byte[]

byte

Remarks

The method invokes the default implementation in the JVM interface