Loading...
Searching...
No Matches
Callback Signature List

List of all callback defined by JavaMqMsgque

The callback have to be a class with an interface like jvmsgque.mqmsgque.MqServiceIF

There a two different types of callback:

  1. A callback used to define a context
  2. A callback used to define a service

Callback signature

The callback in an interface using a single virtual function called Callback.

/* LABEL-NO */
package jvmsgque.mqmsgque;
public interface MqServiceIF {
void Callback (MqContextC ctx);
}
void Callback(MqContextC ctx)

Example from MyServer.java using MqServiceCreate with callback jvmsgque::mqmsgque::MqServiceIF

package example;

import jvmsgque.mkkernel.*;
import jvmsgque.mqmsgque.*;

// package-item
final class MyServer extends MqContextC implements IServerSetup {

  // Factory Constructor
  public MyServer(MqContextC tmpl) {
    super(tmpl);
  }

  // service to serve all incoming requests for token "HLWO"
  class MyFirstCallback implements MqServiceIF {
    public void Callback(MqContextC ctx) {
      SendSTART();
      SendSTR(ReadSTR() + " World");
      SendRETURN();
    }
  }

  // define a service as link between the token "HLWO" and the class "MyFirstService"
  public void ServerSetup() {
    ServiceCreate("HLWO", new MyFirstCallback());
  }

  // -------------------------------------------------------------

  // package-main
  public static void main(String[] argv) {
  
    // create the "MyServer" factory… and return the initial (top) object
    MqContextC srv = MqFactoryC.Add(MyServer.class).New();

    try {
      srv.LinkCreate(argv);
      srv.ProcessEvent(MqWaitOnEventE.FOREVER);
    } catch (Throwable e) {
      srv.ErrorCatch(e);
    }
    srv.Exit();
  }
}

Callbacks defined by JavaMqMsgque

Member MqSendEND_AND_CALLBACK_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MK_TIME_T const timeout)
MqSendEND_AND_CALLBACK
Member MqSendEND_AND_SUB_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MK_TIME_T timeout)
MqSendEND_AND_SUB
Member MqServiceCreate_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MkMarkF fMark)
MqServiceCreate
Member MqSetupS::BgError
ConfigApi_IBgError
Member MqSetupS::Event
ConfigApi_IEvent
Member MqSetupS::ServerCleanup
ConfigApi_IServerCleanup
Member MqSetupS::ServerSetup
ConfigApi_IServerSetup