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

com.microsoft.signalr.InvocationMessage Maven / Gradle / Ivy

There is a newer version: 9.0.0-preview.7.24406.2
Show newest version
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

package com.microsoft.signalr;

import java.util.Collection;
import java.util.Map;

public class InvocationMessage extends HubMessage {
    int type = HubMessageType.INVOCATION.value;
    private Map headers;
    private final String invocationId;
    private final String target;
    private final Object[] arguments;
    private Collection streamIds;

    public InvocationMessage(Map headers, String invocationId, String target, Object[] args, Collection streamIds) {
        if (headers != null && !headers.isEmpty()) {
            this.headers = headers;
        }
        this.invocationId = invocationId;
        this.target = target;
        this.arguments = args;
        if (streamIds != null && !streamIds.isEmpty()) {
            this.streamIds = streamIds;
        }
    }

    public Map getHeaders() {
        return headers;
    }

    public String getInvocationId() {
        return invocationId;
    }

    public String getTarget() {
        return target;
    }

    public Object[] getArguments() {
        return arguments;
    }

    public Collection getStreamIds() {
        return streamIds;
    }

    @Override
    public HubMessageType getMessageType() {
        return HubMessageType.INVOCATION;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy