All Downloads are FREE. Search and download functionalities are using the official Maven repository.

akka.zeromq.ZMQMessageDeserializer.scala Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2009-2012 Typesafe Inc. 
 */
package akka.zeromq

object Frame {
  def apply(text: String): Frame = new Frame(text)
}

/**
 * A single message frame of a zeromq message
 * @param payload
 */
case class Frame(payload: Seq[Byte]) {
  def this(bytes: Array[Byte]) = this(bytes.toSeq)
  def this(text: String) = this(text.getBytes("UTF-8"))
}

/**
 * Deserializes ZeroMQ messages into an immutable sequence of frames
 */
class ZMQMessageDeserializer extends Deserializer {
  def apply(frames: Seq[Frame]) = ZMQMessage(frames)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy