package messages
- Alphabetic
- Public
- All
Type Members
-
final
case class
Abort
(details: Dict = Abort.defaultDetails, reason: Uri)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Sent by a peer to abort the opening of a session.
Sent by a peer to abort the opening of a session. No response is expected.
- details
is a dictionary (empty by default) that allows to provide additional and optional closing information
- reason
is the reason given as URI (e.g. "wamp.error.no_such_realm")
-
final
case class
Bind
(router: ActorRef, transport: String = "default") extends Command with Product with Serializable
This bind command is sent by routing applications with the intent to bind the router to a given named transport configuration .
This bind command is sent by routing applications with the intent to bind the router to a given named transport configuration .
- router
is the router to bind
- transport
is the name of the transport configuration to bind to
-
final
case class
Bound
(listener: ActorRef, uri: URI) extends Signal with Product with Serializable
This bound signal is replied back whenever a Bind command succeed.
This bound signal is replied back whenever a Bind command succeed.
- listener
is the actor reference of the newly spawned connection listener actor
-
final
case class
Call
(requestId: Id, options: Dict = Call.defaultOptions, procedure: Uri, payload: Payload = Payload())(implicit validator: Validator) extends ProtocolMessage with DataConveyor with Product with Serializable
Request sent by a caller to a dealer to call a procedure
Request sent by a caller to a dealer to call a procedure
[CALL, Request|id, Options|dict, Procedure|uri] [CALL, Request|id, Options|dict, Procedure|uri, Arguments|list] [CALL, Request|id, Options|dict, Procedure|uri, Arguments|list, ArgumentsKw|dict]
- requestId
is a random, ephemeral identifier chosen by the caller and used to correlate the dealer's response with the request
- options
is a dictionary that allows to provide additional call request options in an extensible way
- procedure
is the URI of the procedure to be called
- payload
is the payload bearing application data
-
sealed abstract
class
Closed
extends Signal
This closed signal announces session closed
-
trait
Command
extends Message
Represents command messages
-
case class
CommandFailed
(cmd: Command, ex: Throwable) extends Signal with Product with Serializable
This failure signal is replied back whenever a command fails
This failure signal is replied back whenever a command fails
- cmd
is the original command which failed
- ex
is the exception thrown
-
final
case class
Connect
(uri: URI, format: String) extends Command with Product with Serializable
This connect command is sent by a peer (a client) with the intent to establish a transport to another peer (a router).
This connect command is sent by a peer (a client) with the intent to establish a transport to another peer (a router).
- format
is the format used to encode messages (e.g. "wamp.2.json")
-
final
case class
Connected
(handler: ActorRef, uri: URI, format: String) extends Signal with Product with Serializable
It the connected signal replied back whenever a Connect command succeed.
It the connected signal replied back whenever a Connect command succeed.
- handler
is the actor reference of the newly spawned connection handler actor
- format
is the format used to encode messages (e.g. "wamp.2.json")
-
trait
DataConveyor
extends AnyRef
Represents a message conveying application data.
Represents a message conveying application data.
Incoming conveyors
// val message: DataConveyor = ... // Default parsers val args: Future[List[Any]] = message.args val kwargs: Future[Map[String, Any]] = message.kwargs val user: Future[UserType] = message.kwargs[UserType] // Custom parsers val payload: Payload = message.payload payload match { case p: TextLazyPayload => val unparsed: Source[String, _] = p.unparsed // ... case p: BinaryLazyPayload => val unparsed: Source[ByteString, _] = p.unparsed // ... }
-
sealed abstract
class
Disconnected
extends Signal
This disconnected signal announces handler disconnection
-
final
case class
Error
(requestType: Int, requestId: Id, details: Dict = Error.defaultDict, error: Uri, payload: Payload = Payload())(implicit validator: Validator) extends ProtocolMessage with DataConveyor with Product with Serializable
Error reply sent by a peer as an error response to different kinds of requests.
Error reply sent by a peer as an error response to different kinds of requests.
[ERROR, REQUEST.Type|int, REQUEST.Request|id, Details|dict, Error|uri [ERROR, REQUEST.Type|int, REQUEST.Request|id, Details|dict, Error|uri, Arguments|list] [ERROR, REQUEST.Type|int, REQUEST.Request|id, Details|dict, Error|uri, Arguments|list, ArgumentsKw|dict]
- payload
is the payload bearing application data
-
final
case class
Event
(subscriptionId: Id, publicationId: Id, details: Dict = Event.defaultOptions, payload: Payload = Payload())(implicit validator: Validator, executionContent: ExecutionContext) extends ProtocolMessage with DataConveyor with Product with Serializable
Event dispatched by brokers to subscribers for subscriptions the event was matching.
Event dispatched by brokers to subscribers for subscriptions the event was matching.
[EVENT, SUBSCRIBED.Subscription|id, PUBLISHED.Publication|id, Details|dict] [EVENT, SUBSCRIBED.Subscription|id, PUBLISHED.Publication|id, Details|dict, Arguments|list] [EVENT, SUBSCRIBED.Subscription|id, PUBLISHED.Publication|id, Details|dict, Arguments|list, ArgumentsKw|dict]
- subscriptionId
is the identifier of the subscription under which the subscriber receives the event (the identifier for the subscription originally handed out by the broker to the subscriber)
- publicationId
is the identifier of the publication of the published event
- details
is a dictionary that allows to provide additional event details in an extensible way
- payload
is the payload bearing application data
-
final
case class
Goodbye
(details: Dict = Goodbye.defaultDetails, reason: Uri = Goodbye.defaultReason)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Sent by a peer to close a previously opened session.
Sent by a peer to close a previously opened session. Must be echo'ed by the receiving peer.
[GOODBYE, Details|dict, Reason|uri]
- details
is a dictionary (empty by default) that allows to provide additional and optional closing information
- reason
is the reason ("wamp.error.close_realm" by default) given as URI
-
final
case class
HandleHttpConnection
(conn: IncomingConnection) extends Command with Product with Serializable
This handle command is sent by a connection listener upon receiving the incoming connection signal to ask a newly spawned connection handler to handle it
This handle command is sent by a connection listener upon receiving the incoming connection signal to ask a newly spawned connection handler to handle it
- conn
is the incoming connection to be handled
-
final
case class
Hello
(realm: Uri = "default", details: Dict = Hello.defaultDetails)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Sent by a client to initiate opening of a session to a router attaching to a Realm.
Sent by a client to initiate opening of a session to a router attaching to a Realm.
[HELLO, Realm|uri, Details|dict]
WAMP uses "roles & features announcement" instead of "protocol versioning" to allow
- implementations only supporting subsets of functionality - future extensibility
A client must announce the roles it supports via "Hello.Details.roles|dict", with a key mapping to a "Hello.Details.roles.<role>|dict" where "<role>" can be:
- "publisher" - "subscriber" - "caller" - "callee"
-
final
case class
Invocation
(requestId: Id, registrationId: Id, details: Dict = Invocation.defaultDetails, payload: Payload = Payload())(implicit validator: Validator, executionContext: ExecutionContext) extends ProtocolMessage with DataConveyor with Product with Serializable
Invocation dispatched by the dealer to the callee providing the registration the invocation was matching.
Invocation dispatched by the dealer to the callee providing the registration the invocation was matching.
[INVOCATION, Request|id, REGISTERED.Registration|id, Details|dict] [INVOCATION, Request|id, REGISTERED.Registration|id, Details|dict, CALL.Arguments|list] [INVOCATION, Request|id, REGISTERED.Registration|id, Details|dict, CALL.Arguments|list, CALL.ArgumentsKw|dict]
- requestId
is a random, ephemeral identifier chosen by the dealer and used to correlate the callee's response with the request.
- registrationId
is the registration identifier under which the procedure was registered at the dealer.
- details
is a dictionary that allows to provide additional invocation request details in an extensible way.
- payload
is the payload bearing application data
-
trait
Message
extends AnyRef
Represents all messages
-
sealed
trait
ProtocolMessage
extends Message
Represents protocol messages exchanged by Peers
-
final
case class
Publish
(requestId: Id, options: Dict = Publish.defaultOptions, topic: Uri, payload: Payload = Payload())(implicit validator: Validator) extends ProtocolMessage with DataConveyor with Product with Serializable
Sent by a publisher to a broker to publish an event.
Sent by a publisher to a broker to publish an event.
[PUBLISH, Request|id, Options|dict, Topic|uri] [PUBLISH, Request|id, Options|dict, Topic|uri, Arguments|list] [PUBLISH, Request|id, Options|dict, Topic|uri, Arguments|list, ArgumentsKw|dict]
- requestId
is a random, ephemeral identifier chosen by the Publisher and used to correlate the Broker's response with the request.
- options
is a dictionary that allows to provide additional publication request details in an extensible way.
- topic
is the topic published to.
- payload
is the payload bearing application data
-
final
case class
Published
(requestId: Id, publicationId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Acknowledge sent by a Broker to a Publisher for acknowledged Publications.
Acknowledge sent by a Broker to a Publisher for acknowledged Publications.
[PUBLISHED, PUBLISH.Request|id, Publication|id]
- requestId
is the identifier from the original publication request
- publicationId
is a identifier chosen by the router for the publication
-
final
case class
Register
(requestId: Id, options: Dict = Register.defaultOptions, procedure: Uri)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Register request sent by a callee to a dealer to register a procedure endpoint
Register request sent by a callee to a dealer to register a procedure endpoint
[REGISTER, Request|id, Options|dict, Procedure|uri]
- requestId
is a random, ephemeral identifier chosen by the Callee and used to correlate the Dealer's response with the request
- options
is a dictionary that allows to provide additional registration request details in a extensible way
- procedure
is the procedure the Callee wants to register
-
final
case class
Registered
(requestId: Id, registrationId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Acknowledge sent by a dealer to a callee to acknowledge a registration
Acknowledge sent by a dealer to a callee to acknowledge a registration
[REGISTERED, REGISTER.Request|id, Registration|id]
- requestId
is the identifier from the original register request
- registrationId
is an identifier chosen by the dealer for the registration
-
final
case class
Result
(requestId: Id, details: Dict = Result.defaultDetails, payload: Payload = Payload())(implicit validator: Validator, ec: ExecutionContext) extends ProtocolMessage with DataConveyor with Product with Serializable
Result of a call as returned by dealer to caller
Result of a call as returned by dealer to caller
[RESULT, CALL.Request|id, Details|dict] [RESULT, CALL.Request|id, Details|dict, Arguments|list] [RESULT, CALL.Request|id, Details|dict, Arguments|list, ArgumentsKw|dict]
- requestId
is the identifiers from the original call request
- details
is a dictionary that allows to provide additional details in an extensible way
- payload
is the payload bearing application data
-
trait
Signal
extends Message
Common interface for all signals generated by this extension
-
final
case class
Subscribe
(requestId: Id, options: Dict = Subscribe.defaultOptions, topic: Uri)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Subscribe request sent by a Subscriber to a Broker to subscribe to a Topic.
Subscribe request sent by a Subscriber to a Broker to subscribe to a Topic.
[SUBSCRIBE, Request|id, Options|dict, Topic|uri]
- requestId
is a random, ephemeral identifier chosen by the Subscriber and used to correlate the Broker's response with the request
- options
is a dictionary that allows to provide additional subscription request details in a extensible way
- topic
is the topic the Subscribe wants to subscribe to
-
final
case class
Subscribed
(requestId: Id, subscriptionId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Acknowledge sent by a Broker to a Subscriber to acknowledge a subscription.
Acknowledge sent by a Broker to a Subscriber to acknowledge a subscription.
[SUBSCRIBED, SUBSCRIBE.Request|id, Subscription|id]
- requestId
is the identifier from the original Subscribe request
- subscriptionId
is an identifier chosen by the Broker for the subscription
-
final
case class
Unregister
(requestId: Id, registrationId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Unregister request sent by a callee to a dealer to unregister a procedure endpoint.
Unregister request sent by a callee to a dealer to unregister a procedure endpoint.
[UNREGISTER, Request|id, REGISTERED.Registration|id]
- requestId
is a random, ephemeral identifier chosen by the callee and used to correlate the dealer's response with the request.
- registrationId
is the identifier for the registration to revoke, originally handed out by the dealer to the callee.
-
final
case class
Unregistered
(requestId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Acknowledge sent by a dealer to a callee to acknowledge unregistration.
Acknowledge sent by a dealer to a callee to acknowledge unregistration.
[UNREGISTERED, UNREGISTER.Request|id]
- requestId
is the identifier from the original Subscribed request
-
final
case class
Unsubscribe
(requestId: Id, subscriptionId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Unsubscribe request sent by a Subscriber to a Broker to unsubscribe from a Subscription.
Unsubscribe request sent by a Subscriber to a Broker to unsubscribe from a Subscription.
[UNSUBSCRIBE, Request|id, SUBSCRIBED.Subscription|id]
- requestId
is a random, ephemeral identifier chosen by the Unsubscribe and used to correlate the Broker's response with the request
- subscriptionId
is the identifier for the subscription to unsubscribe from, originally handed out by the Broker to the Subscriber
-
final
case class
Unsubscribed
(requestId: Id)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Is the unsubscribed acknowledge
Is the unsubscribed acknowledge
[UNSUBSCRIBED, UNSUBSCRIBE.Request|id]
- requestId
is the identifier from the original Subscribed request
-
final
case class
Welcome
(sessionId: Id, details: Dict = Welcome.defaultDetails)(implicit validator: Validator) extends ProtocolMessage with Product with Serializable
Sent by a router to accept a client and let it know the session is now open
Sent by a router to accept a client and let it know the session is now open
[WELCOME, Session|id, Details|dict]
- sessionId
is the session identifier
- details
is the session details
-
final
case class
Yield
(requestId: Id, options: Dict = Yield.defaultOptions, payload: Payload = Payload())(implicit validator: Validator) extends ProtocolMessage with DataConveyor with Product with Serializable
Is the
message sent by a callee's registered invocation handler to the dealerYIELD
Is the
message sent by a callee's registered invocation handler to the dealerYIELD
[YIELD, INVOCATION.Request|id, Options|dict] [YIELD, INVOCATION.Request|id, Options|dict, Arguments|list] [YIELD, INVOCATION.Request|id, Options|dict, Arguments|list, ArgumentsKw|dict]
- requestId
is the identifier from the original invocation request
- options
is a dictionary that allows to provide additional options in an extensible way
- payload
is the payload conveyed by this message
Value Members
- object Abort extends Serializable
- object Call extends Serializable
- object Closed extends Closed with Product with Serializable
-
object
Disconnect
extends Command with Product with Serializable
This disconnect command is sent by client applications with the intent to connect from a router.
- object Disconnected extends Disconnected with Product with Serializable
- object Error extends Serializable
- object Event extends Serializable
- object Goodbye extends Serializable
- object Hello extends Serializable
- object Invocation extends Serializable
- object Publish extends Serializable
- object Published extends Serializable
- object Register extends Serializable
- object Registered extends Serializable
- object Result extends Serializable
- object Subscribe extends Serializable
- object Subscribed extends Serializable
-
object
Unbind
extends Product with Serializable
This unbind command is sent by routing applications with the intent to unbound from a transport.
- object Unregister extends Serializable
- object Unregistered extends Serializable
- object Unsubscribe extends Serializable
- object Unsubscribed extends Serializable
-
object
WampMessage
Factory of Message instances
- object Welcome extends Serializable
-
object
Yield
extends Serializable
Defines some useful constants