All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kpavlov.jreactive8583.iso.MessageFactory.kt Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
@file:JvmName("MessageFactory")

package com.github.kpavlov.jreactive8583.iso

import java.io.UnsupportedEncodingException
import java.text.ParseException

public interface MessageFactory {
    public fun newMessage(type: Int): T

    public fun newMessage(
        messageClass: MessageClass,
        messageFunction: MessageFunction,
        messageOrigin: MessageOrigin,
    ): T

    /**
     * Creates a new message with a default message origin (i.e. role)
     */
    public fun newMessage(
        messageClass: MessageClass,
        messageFunction: MessageFunction,
    ): T

    public fun createResponse(requestMessage: T): T

    public fun createResponse(
        request: T,
        copyAllFields: Boolean,
    ): T

    @Throws(ParseException::class, UnsupportedEncodingException::class)
    public fun parseMessage(
        buf: ByteArray,
        isoHeaderLength: Int,
        binaryIsoHeader: Boolean,
    ): T

    @Throws(UnsupportedEncodingException::class, ParseException::class)
    public fun parseMessage(
        buf: ByteArray,
        isoHeaderLength: Int,
    ): T
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy