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

com.microsoft.azure.gateway.core.LocalBroker Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 */
package com.microsoft.azure.gateway.core;

import com.microsoft.azure.gateway.messaging.Message;

class LocalBroker {

    // Loads the native library
    static {
        System.loadLibrary("java_module_host");
    }
    
  //Private Native Methods
    /**
     * Native Broker_Publish function. When this method is called, it will call into the native Broker_Publish
     * function to publish the provided {@link Message} to the native Broker.
     *
     * @see Message broker documentation
     *
     * @param brokerAddr The address of the pointer to the native Broker.
     * @param moduleAddr The address of the pointer to the native module.
     * @param message The serialized {@link Message} to be published.
     * @return 0 on success, non-zero otherwise.
     */
    native int publishMessage(long brokerAddr, long moduleAddr, byte[] message);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy