mot

package mot

Main package for Mot implementation. User-facing classes reside directly in the top-level package, with utility classes residing in the mot.util sub-package. The rest of the sub-packages contain implementation classes.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. mot
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Address(host: String, port: Int) extends Product with Serializable

    Destination for messages.

    Destination for messages.

    host

    Host to connect to. Can be an IP address or a domain name. In the latter case, all records are tried sequentially in case of error.

    port

    TCP port to connect to.

  2. class ByeException extends Exception with CounterpartyClosedException

    Exception used as a cause when a connection was normally terminated by the counter party.

  3. final class Client extends MotParty with StrictLogging

    Mot client.

    Mot client. Instantiate this class to create a client-side Mot protocol engine.

  4. final class ClientFlow extends StrictLogging

    A "client flow" is an abstraction created to enable selective flow control, which is a way to ask the server in the other side to stop sending responses of a certain kind.

    A "client flow" is an abstraction created to enable selective flow control, which is a way to ask the server in the other side to stop sending responses of a certain kind. The need for selective flow control comes when the client can receive back-pressure using some subset of the responses. Proxy servers are a prototypical case: when sending the responses to the front-end, some clients can slow down (the slowness can come from the themselves or from the network) and the proxy must either buffer the data, discard it, or tell the back-end to stop sending it.

    If there is no need to be selective, there is no need of explicit flow control, as it is simpler to rely on TCP for that (not reading, and causing "zero window" notifications). This is the most common case.

    Instances of this class are created by the Mot client, and are used opaquely: each request is associated with a flow (which defaults to the main flow). The client can then use the flows (of which it must keep references) to stop responses selectively: "closing" a flow instructs the server to do not send the responses of the messages that were associated with that particular flow. If flow control is not used, there is only one instance of this class, which is always created (the "main flow" with id 0).

    This mechanism only applies to responses. Requests do not need it, as it is always possible to respond them with an application-level indication to stop. This is not the case with responses, which could only be discarded. (In the proxy case, additionally, it would be impossible for the front-end to know in advance which is the final target of a request).

    It is also worth mentioning that no response is stopped half-sent: Mot is a small-message protocol and each message (that cannot use more than one frame) is always sent entirely o not at all.

    See also

    mot.protocol.FlowControlFrame

  5. final class Context extends AnyRef

    Mot context.

    Mot context. Instances of mot.Client and mot.Server need to be associated with a context.

  6. trait CounterpartyClosedException extends Exception

    Exception that mix this trait are used as a cause when a connection was terminated (somehow) by the counter party.

  7. class ErrorStateException extends Exception

    Exception thrown when the client could not establish a connection and the tolerance period is exceeded.

  8. case class IncomingMessage extends Product with Serializable

    Represent an incoming message to a Mot server.

  9. case class IncomingResponse extends Product with Serializable

    Represent an incoming response to a Mot client.

    Represent an incoming response to a Mot client. It can also represent a failure sending a message.

  10. class InvalidConnectionException extends Exception

    Exception thrown by the server when trying to responde a message over an already closed connection.

  11. class LocalClosedException extends Exception

    Exception use as a cause to signal the cases when the client or server was locally closed.

  12. final class Message extends AnyRef

    A Mot message.

    A Mot message. This class represents Mot messages, either outgoing or incoming. In order to construct an instance, one of the factory methods of the companion object must be used.

  13. class MessageTooLargeException extends Exception

    Exception thrown when trying to send a message bigger than the counter party would accept.

  14. trait MotParty extends AnyRef

    Trait that represents Mot parties, either Client or Servers.

  15. class NotRespondableException extends Exception

    Exception thrown when trying to response an unrespondable message.

  16. class ResetException extends Exception with CounterpartyClosedException

    Exception used as a cause when a connection was abnormally terminated by the counter party.

  17. final class Responder extends AnyRef

    Instances of this class are created by server-side parties as handlers for responding messages.

    Instances of this class are created by server-side parties as handlers for responding messages. Each respondible request has one distinct instance.

  18. class ResponseAlreadySendException extends Exception

    Exception thrown when trying to response the same message twice.

  19. class ResponseTimeoutException extends Exception with NoStackTraceException

    Exception use as a cause to signal the cases when the response of a message timed out.

  20. final class Server extends MotParty with StrictLogging

    Mot server.

    Mot server. Instantiate this class to create a server-side Mot protocol engine.

  21. final class ServerFlow extends AnyRef

    Instances of this class represent a server-side flow.

    Instances of this class represent a server-side flow.

    See also

    mot.ClientFlow

  22. trait UncaughtErrorHandler extends AnyRef

    A trait containing a method to be called in the case of a fatal error in the Mot implementation.

    A trait containing a method to be called in the case of a fatal error in the Mot implementation. This errors would be in fact bugs and will not happen, in theory. In case they happen in practice, this trait is used to define what to do. Reasonable behaviors are logging with an error level or (if appropiate) crashing the process.

Value Members

  1. object Address extends Serializable

  2. object Limits

  3. object LoggingErrorHandler extends UncaughtErrorHandler with StrictLogging

  4. object Message

  5. package buffer

  6. package dump

  7. package impl

  8. package monitoring

  9. package protocol

    Package that contains the classes that represent Mot frames.

  10. package queue

  11. package util

Inherited from AnyRef

Inherited from Any

Ungrouped