Nimbus

Nimbus

  • Docs
  • Getting Started
  • Help

›Clients

Documentation

  • Introduction
  • Deployment

Deploying Resources

  • File Storage Bucket
  • Document Store
  • Key-Value Store
  • Relational Database
  • Functions

    • HTTP Function
    • WebSocket Function
    • Document Store Function
    • Key-Value Store Function
    • Notification Function
    • Queue Function
    • Basic Function
    • File Storage Function
    • After Deployment Function
    • Environment Variables

Clients

  • Document Store Client
  • Key-Value Store Client
  • File Storage Client
  • WebSocket Management Client
  • Basic Serverless Function Client
  • Notification Topic Client
  • Queue Client
  • Relational Database Client
  • Environment Variable Client

Local Deployment

  • Unit Testing
  • Local Server

WebSocket Management Client

A ServerlessFunctionWebSocketClient allows a @WebSocketServerlessFunction to send messages along websockets to ConnectionIds.

Initialisation

To create a ServerlessFunctionWebSocketClient:

ServerlessFunctionWebSocketClient webSocketClient = ClientBuilder.getServerlessFunctionWebSocketClient();

Additionally the serverless function that needs access to the client needs to be annotated with @UsesServerlessFunctionWebSocketClient to handle cloud permissions.

UsesServerlessFunctionWebSocketClient Methods

  • void sendToConnection(Sting connectionId, ByteBuffer data) - Sends the contents of data to the client corresponding to the connectionId.

  • void sendToConnectionConvertToJson(String connectionId: String, Object data) - Sends the contents of data to the client corresponding to the connectionId. This function handles the conversion to ByteBuffer for you.

Annotation Sepecification

@UsesServerlessFunctionWebSocketClient

Optional Parameters

  • stages - The stages which this function has access to the websocket client
← File Storage ClientBasic Serverless Function Client →
  • Initialisation
  • UsesServerlessFunctionWebSocketClient Methods
  • Annotation Sepecification
    • @UsesServerlessFunctionWebSocketClient
Nimbus
Docs
Getting StartedDocumentation
More
GitHubStar
Copyright © 2019 Thomas Allerton