HubProtocol Interface

public interface HubProtocol

A protocol abstraction for communicating with SignalR hubs.

Method Summary

Modifier and Type Method and Description
abstract java.lang.String getName()
abstract int getVersion()
abstract java.util.List<HubMessage> parseMessages(ByteBuffer message, InvocationBinder binder)

Creates a new list of HubMessages.

abstract java.nio.ByteBuffer writeMessage(HubMessage message)

Writes the specified HubMessage to a String.

Method Details

getName

public abstract String getName()

getVersion

public abstract int getVersion()

parseMessages

public abstract List parseMessages(ByteBuffer message, InvocationBinder binder)

Creates a new list of HubMessages.

Parameters:

message - A ByteBuffer representation of one or more HubMessages.
binder - The InvocationBinder to use for this Protocol instance.

Returns:

A list of HubMessages.

writeMessage

public abstract ByteBuffer writeMessage(HubMessage message)

Writes the specified HubMessage to a String.

Parameters:

message - The message to write.

Returns:

A ByteBuffer representation of the message.

Applies to