redux-autobahn-js
June 13, 2018 · View on GitHub
Objects
- redux-autobahn:actions :
object - redux-autobahn:middleware :
object - redux-autobahn:reducer :
object - redux-autobahn:types :
object
redux-autobahn:actions : object
Kind: global namespace
- redux-autobahn:actions :
object- .openConnection() ⇒
object - .closeConnection() ⇒
object - .subscribe(topic) ⇒
object - .unsubscribe(subscriptionOrTopic) ⇒
object - .publish(topic, args, kwargs, options) ⇒
object - .register(procedure, endpoint, options) ⇒
object - .unregister(registration) ⇒
object - .call(procedure, args, kwargs, options, resultAction, errorAction) ⇒
object
- .openConnection() ⇒
redux-autobahn:actions.openConnection() ⇒ object
Returns a redux action with type OPEN_CONNECTION
Kind: static method of redux-autobahn:actions
Returns: object - redux action
redux-autobahn:actions.closeConnection() ⇒ object
Returns a redux action with type CLOSE_CONNECTION
Kind: static method of redux-autobahn:actions
Returns: object - redux action
redux-autobahn:actions.subscribe(topic) ⇒ object
Returns a redux action with type SUBSCRIBE and the given topic
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| topic | string | The topic being subscribed to. |
redux-autobahn:actions.unsubscribe(subscriptionOrTopic) ⇒ object
Returns a redux action with type UNSUBSCRIBE and the given subscription or topic
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| subscriptionOrTopic | object | string | The subscription or topic being unsubscribed from. |
redux-autobahn:actions.publish(topic, args, kwargs, options) ⇒ object
Returns a redux action with type PUBLISH and the given topic, args, kwargs, and options
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| topic | string | The topic being subscribed to. |
| args | Array | An array of arguments. |
| kwargs | object | An object of keyword arguments. |
| options | object | An object of options. |
redux-autobahn:actions.register(procedure, endpoint, options) ⇒ object
Returns a redux action with type REGISTER and the given procedure, endpoint, and options
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| procedure | string | The procedure name being registered. |
| endpoint | function | The endpoint function being registered. |
| options | object | An object of options. |
redux-autobahn:actions.unregister(registration) ⇒ object
Returns a redux action with type UNREGISTER and the given registration object
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| registration | object | The registration object. |
redux-autobahn:actions.call(procedure, args, kwargs, options, resultAction, errorAction) ⇒ object
Returns a redux action with type CALL and the given procedure, args, kwargs, and options
Kind: static method of redux-autobahn:actions
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| procedure | string | The procedure name being called. |
| args | Array | An array of arguments. |
| kwargs | object | An object of keyword arguments. |
| options | object | An object of options. |
| resultAction | object | (optional) An action to be dispatched on call success. |
| errorAction | object | (optional) An action to be dispatched on call error. |
redux-autobahn:middleware : object
Kind: global namespace
- redux-autobahn:middleware :
object- .connected() ⇒
object - .disconnected() ⇒
object - .connectionOpened(connection) ⇒
object - .connectionClosed(reason, details) ⇒
object - .subscribed(subscription) ⇒
object - .subscribeError(error) ⇒
object - .unsubscribed(subscription) ⇒
object - .unsubscribeError(error) ⇒
object - .published(publication, topic, args, kwargs, options) ⇒
object - .publishError(error) ⇒
object - .event(topic, args, kwargs, details) ⇒
object - .registered(registration) ⇒
object - .registerError(error) ⇒
object - .unregistered(registration) ⇒
object - .unregisterError(error) ⇒
object - .callError(error) ⇒
object - .result(procedure, args, kwargs, results, options) ⇒
object - .isConnected(connection) ⇒
boolean - .getSubscription(action) ⇒
object - .handleAction(connection, dispatch, next, action)
- .assert(assertion, message)
- .setConnection(newConnection)
- .closeConnection(reason, message)
- .connected() ⇒
redux-autobahn:middleware.connected() ⇒ object
Returns a redux action with type CONNECTED
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
redux-autobahn:middleware.disconnected() ⇒ object
Returns a redux action with type DISCONNECTED
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
redux-autobahn:middleware.connectionOpened(connection) ⇒ object
Returns a redux action with type CONNECTION_OPENED and the given session object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| connection | object | The object for the opened connection. |
redux-autobahn:middleware.connectionClosed(reason, details) ⇒ object
Returns a redux action with type CONNECTION_CLOSED
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| reason | string | reason for disconnection |
| details | object | disconnect details |
redux-autobahn:middleware.subscribed(subscription) ⇒ object
Returns a redux action with type SUBSCRIBED and the given subscription object and it's topic
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| subscription | object | The subscription object for the topic that was subscribed to. |
redux-autobahn:middleware.subscribeError(error) ⇒ object
Returns a redux action with type SUBSCRIBE_ERROR and the given subscription error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while subscribing. |
redux-autobahn:middleware.unsubscribed(subscription) ⇒ object
Returns a redux action with type UNSUBSCRIBED and the given subscription object and it's topic
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| subscription | object | The subscription object for the topic that was unsubscribed from. |
redux-autobahn:middleware.unsubscribeError(error) ⇒ object
Returns a redux action with type UNSUBSCRIBE_ERROR and the given unsubscription error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while unsubscribing. |
redux-autobahn:middleware.published(publication, topic, args, kwargs, options) ⇒ object
Returns a redux action with type PUBLISHED and the given publication, topic, args, kwargs, and options
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| publication | string | The publication being published to. |
| topic | string | The topic being published to. |
| args | Array | An array of arguments. |
| kwargs | object | An object of keyword arguments. |
| options | object | An object of options. |
redux-autobahn:middleware.publishError(error) ⇒ object
Returns a redux action with type PUBLISH_ERROR and the given publish error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while publishing. |
redux-autobahn:middleware.event(topic, args, kwargs, details) ⇒ object
Returns a redux action with type EVENT and the given topic, args, kwargs, and details
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| topic | string | The topic being published to. |
| args | Array | An array of arguments. |
| kwargs | object | An object of keyword arguments. |
| details | object | An object of event details. |
redux-autobahn:middleware.registered(registration) ⇒ object
Returns a redux action with type REGISTERED and the given registration object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| registration | object | The registration object being registered to. |
redux-autobahn:middleware.registerError(error) ⇒ object
Returns a redux action with type REGISTER_ERROR and the given register error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while registering. |
redux-autobahn:middleware.unregistered(registration) ⇒ object
Returns a redux action with type UNREGISTERED and the given registration object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| registration | object | The registration object being unregistered from. |
redux-autobahn:middleware.unregisterError(error) ⇒ object
Returns a redux action with type UNREGISTER_ERROR and the given unregister error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while unregistering. |
redux-autobahn:middleware.callError(error) ⇒ object
Returns a redux action with type CALL_ERROR and the given call error object
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| error | object | The error that occurred while calling. |
redux-autobahn:middleware.result(procedure, args, kwargs, results, options) ⇒ object
Returns a redux action with type RESULT and the given result value
Kind: static method of redux-autobahn:middleware
Returns: object - redux action
| Param | Type | Description |
|---|---|---|
| procedure | object | Procedure that was called |
| args | object | Arguments with which procedure was called |
| kwargs | object | Arguments with which procedure was called |
| results | object | Call results |
| options | object | Options |
redux-autobahn:middleware.isConnected(connection) ⇒ boolean
Returns a boolean that represents if the session for the connection exists and is open, therefore it is connected
Kind: static method of redux-autobahn:middleware
Returns: boolean - returns true if the session for the connection exists and is open
| Param | Type | Description |
|---|---|---|
| connection | object | the connection object |
redux-autobahn:middleware.getSubscription(action) ⇒ object
Returns the subscription from the action
Kind: static method of redux-autobahn:middleware
Returns: object - the subscription on the action
| Param | Type | Description |
|---|---|---|
| action | object | the redux action |
redux-autobahn:middleware.handleAction(connection, dispatch, next, action)
Dispatches actions based on action types
Kind: static method of redux-autobahn:middleware
| Param | Type | Description |
|---|---|---|
| connection | object | the connection object |
| dispatch | function | the dispatch function |
| next | function | the next function |
| action | object | the redux action |
redux-autobahn:middleware.assert(assertion, message)
Throws an error if the assertion is falsy
Kind: static method of redux-autobahn:middleware
Throws:
Errorthrows an error with the given message if the assertion is falsy
| Param | Type | Description |
|---|---|---|
| assertion | object | the assertion expression |
| message | object | the assertion message |
redux-autobahn:middleware.setConnection(newConnection)
Sets the passed connection for the middleware that dispatches opened and closed connection actions and handles actions
Kind: static method of redux-autobahn:middleware
| Param | Type | Description |
|---|---|---|
| newConnection | Connection | the connection object |
redux-autobahn:middleware.closeConnection(reason, message)
Closes the current autobahn connection
Kind: static method of redux-autobahn:middleware
| Param | Type | Description |
|---|---|---|
| reason | string | (optional) a WAMP URI providing a closing reason to the server side (e.g. 'com.myapp.close.signout'). default is wamp.goodbye.normal |
| message | string | human-readable closing message |
redux-autobahn:reducer : object
Kind: global namespace
- redux-autobahn:reducer :
object- .connection(state, action) ⇒
object - .session(state, action) ⇒
object - .subscriptions(state, action) ⇒
object - .registrations(state, action) ⇒
object
- .connection(state, action) ⇒
redux-autobahn:reducer.connection(state, action) ⇒ object
Kind: static method of redux-autobahn:reducer
Returns: object - the new state
| Param | Type | Description |
|---|---|---|
| state | object | the state |
| action | object | redux action |
redux-autobahn:reducer.session(state, action) ⇒ object
Kind: static method of redux-autobahn:reducer
Returns: object - the new state
| Param | Type | Description |
|---|---|---|
| state | object | the state |
| action | object | redux action |
redux-autobahn:reducer.subscriptions(state, action) ⇒ object
Kind: static method of redux-autobahn:reducer
Returns: object - the new state
| Param | Type | Description |
|---|---|---|
| state | object | the state |
| action | object | redux action |
redux-autobahn:reducer.registrations(state, action) ⇒ object
Kind: static method of redux-autobahn:reducer
Returns: object - the new state
| Param | Type | Description |
|---|---|---|
| state | object | the state |
| action | object | redux action |
redux-autobahn:types : object
Kind: global namespace
- redux-autobahn:types :
object- .CONNECTED :
string - .DISCONNECTED :
string - .OPEN_CONNECTION :
string - .CLOSE_CONNECTION :
string - .CONNECTION_OPENED :
string - .CONNECTION_CLOSED :
string - .SUBSCRIBE :
string - .SUBSCRIBED :
string - .SUBSCRIBE_ERROR :
string - .UNSUBSCRIBE :
string - .UNSUBSCRIBED :
string - .UNSUBSCRIBE_ERROR :
string - .PUBLISH :
string - .PUBLISHED :
string - .PUBLISH_ERROR :
string - .EVENT :
string - .REGISTER :
string - .REGISTERED :
string - .REGISTER_ERROR :
string - .UNREGISTER :
string - .UNREGISTERED :
string - .UNREGISTER_ERROR :
string - .CALL :
string - .CALL_ERROR :
string - .RESULT :
string
- .CONNECTED :
redux-autobahn:types.CONNECTED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.DISCONNECTED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.OPEN_CONNECTION : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.CLOSE_CONNECTION : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.CONNECTION_OPENED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.CONNECTION_CLOSED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.SUBSCRIBE : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.SUBSCRIBED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.SUBSCRIBE_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNSUBSCRIBE : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNSUBSCRIBED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNSUBSCRIBE_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.PUBLISH : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.PUBLISHED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.PUBLISH_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.EVENT : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.REGISTER : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.REGISTERED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.REGISTER_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNREGISTER : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNREGISTERED : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.UNREGISTER_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.CALL : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.CALL_ERROR : string
Kind: static constant of redux-autobahn:types
redux-autobahn:types.RESULT : string
Kind: static constant of redux-autobahn:types