diff --git a/README.textile b/README.textile
index 930298445c..d1700f194b 100644
--- a/README.textile
+++ b/README.textile
@@ -46,4 +46,8 @@ Akka has a microkernel that embeds the Actor management, Persistence service, RE
h2. Documentation
-Akka has pretty thorough "reference documentation": https://github.com/jboner/akka/wikis. Covering examples, APIs and configuration.
+Akka has pretty thorough "reference documentation":https://github.com/jboner/akka/wikis. Covering examples, APIs and configuration.
+
+h2. Distribution
+
+You can find the latest distribution (v 0.5) "here":
\ No newline at end of file
diff --git a/akka.ipr b/akka.ipr
index efcb9a85eb..69a6d95917 100644
--- a/akka.ipr
+++ b/akka.ipr
@@ -1401,17 +1401,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1445,6 +1434,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/akka.iws b/akka.iws
index f17f9c7c2c..e4f61efaf6 100644
--- a/akka.iws
+++ b/akka.iws
@@ -6,125 +6,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -224,61 +123,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -287,7 +132,70 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -296,16 +204,7 @@
-
-
-
-
-
-
-
-
-
-
+
@@ -324,22 +223,22 @@
@@ -419,6 +318,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -543,6 +532,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -573,6 +622,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1879,17 +1958,16 @@
-
-
-
-
-
+
+
+
+
@@ -1901,6 +1979,7 @@
+
@@ -1942,55 +2021,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2000,41 +2030,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2049,9 +2044,93 @@
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/start-akka-server.sh b/bin/start-akka-server.sh
index d3bbb987a1..82f2290155 100755
--- a/bin/start-akka-server.sh
+++ b/bin/start-akka-server.sh
@@ -57,7 +57,7 @@ CLASSPATH=$CLASSPATH:$BASE_DIR/lib/libthrift.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/log4j-1.2.15.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/lucene-core-2.2.0.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/netty-3.1.0.CR1.jar
-CLASSPATH=$CLASSPATH:$BASE_DIR/lib/protobuf-java-2.0.3.jar
+CLASSPATH=$CLASSPATH:$BASE_DIR/lib/protobuf-java-2.1.0.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/scala-library-2.7.5.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/servlet-api-2.5.jar
CLASSPATH=$CLASSPATH:$BASE_DIR/lib/slf4j-api-1.4.3.jar
diff --git a/fun-test-java/akka-fun-test-java.iml b/fun-test-java/akka-fun-test-java.iml
index eb18d6b0d3..16b76a1159 100644
--- a/fun-test-java/akka-fun-test-java.iml
+++ b/fun-test-java/akka-fun-test-java.iml
@@ -14,7 +14,7 @@
-
+
diff --git a/kernel/akka-kernel.iml b/kernel/akka-kernel.iml
index f27bbc8101..44cd32674d 100644
--- a/kernel/akka-kernel.iml
+++ b/kernel/akka-kernel.iml
@@ -30,7 +30,7 @@
-
+
diff --git a/kernel/pom.xml b/kernel/pom.xml
index b57f9bc803..e6c5ebfb02 100644
--- a/kernel/pom.xml
+++ b/kernel/pom.xml
@@ -71,6 +71,11 @@
jackson-mapper-asl
1.1.0
+
+ com.google.protobuf
+ protobuf-java
+ 2.1.0
+
diff --git a/kernel/src/main/scala/actor/ActiveObject.scala b/kernel/src/main/scala/actor/ActiveObject.scala
index 285608db06..07b27dd790 100644
--- a/kernel/src/main/scala/actor/ActiveObject.scala
+++ b/kernel/src/main/scala/actor/ActiveObject.scala
@@ -7,10 +7,13 @@ package se.scalablesolutions.akka.kernel.actor
import java.io.File
import java.lang.reflect.{InvocationTargetException, Method}
import java.net.InetSocketAddress
+
import kernel.config.ScalaConfig._
-import kernel.nio.{RemoteRequest, RemoteClient}
import kernel.reactor.{MessageDispatcher, FutureResult}
-import kernel.util.{HashCode, Serializer, JavaSerializationSerializer}
+import kernel.util.{HashCode, Serializer, JSONSerializer}
+import kernel.nio.RemoteRequestIdFactory
+import kernel.config.JavaConfig.RestartCallbacks
+import kernel.nio.protobuf.RemoteProtocol.RemoteRequest
import org.codehaus.aspectwerkz.intercept.{Advisable, AroundAdvice}
import org.codehaus.aspectwerkz.joinpoint.{MethodRtti, JoinPoint}
@@ -35,6 +38,8 @@ object Annotations {
*/
class ActiveObjectFactory {
+ protected[this] val serializer: Serializer = JSONSerializer
+
// FIXME How to pass the MessageDispatcher on from active object to child???????
def newInstance[T](target: Class[T], timeout: Long): T =
@@ -276,9 +281,20 @@ sealed class ActorAroundAdvice(val target: Class[_],
private def remoteDispatch(joinpoint: JoinPoint): AnyRef = {
val rtti = joinpoint.getRtti.asInstanceOf[MethodRtti]
val oneWay = isOneWay(rtti)
- val future = RemoteClient.clientFor(remoteAddress.get).send(
- new RemoteRequest(rtti.getParameterValues, rtti.getMethod.getName, target.getName,
- timeout, actor.registerSupervisorAsRemoteActor, false, oneWay, false))
+ val message = rtti.getParameterValues
+ val request = RemoteRequest.newBuilder
+ .setId(RemoteRequestIdFactory.nextId)
+ .setMessage(serializer.out(message))
+ .setMessageType(message.getClass.getName)
+ .setMethod(rtti.getMethod.getName)
+ .setTarget(target.getName)
+ .setTimeout(timeout)
+ .setSupervisorUuid(actor.registerSupervisorAsRemoteActor)
+ .setIsActor(false)
+ .setIsOneWay(oneWay)
+ .setIsEscaped(false)
+ .build
+ val future = RemoteClient.clientFor(remoteAddress.get).send(request)
if (oneWay) null // for void methods
else {
if (future.isDefined) {
diff --git a/kernel/src/main/scala/actor/Actor.scala b/kernel/src/main/scala/actor/Actor.scala
index f9a46f8eea..1d055bfcbd 100644
--- a/kernel/src/main/scala/actor/Actor.scala
+++ b/kernel/src/main/scala/actor/Actor.scala
@@ -7,12 +7,15 @@ package se.scalablesolutions.akka.kernel.actor
import java.net.InetSocketAddress
import java.util.concurrent.CopyOnWriteArraySet
-import kernel.nio.{RemoteServer, RemoteClient, RemoteRequest}
import kernel.reactor._
import kernel.config.ScalaConfig._
import kernel.stm.TransactionManagement
import kernel.util.Helpers.ReadWriteLock
import kernel.util.{Serializer, JSONSerializer, Logging}
+import kernel.nio._
+import kernel.nio.protobuf._
+
+import nio.protobuf.RemoteProtocol.RemoteRequest
sealed abstract class LifecycleMessage
case class Init(config: AnyRef) extends LifecycleMessage
case class HotSwap(code: Option[PartialFunction[Any, Unit]]) extends LifecycleMessage
@@ -51,7 +54,6 @@ trait Actor extends Logging with TransactionManagement {
protected[this] val linkedActors = new CopyOnWriteArraySet[Actor]
protected[actor] var lifeCycleConfig: Option[LifeCycle] = None
- // FIXME switch to JSON serialization
protected[this] val serializer: Serializer = JSONSerializer
// ====================================
@@ -391,8 +393,19 @@ trait Actor extends Logging with TransactionManagement {
private def postMessageToMailbox(message: AnyRef): Unit = remoteFlagLock.withReadLock { // the price you pay for being able to make an actor remote at runtime
if (remoteAddress.isDefined) {
- val supervisorUuid = registerSupervisorAsRemoteActor
- RemoteClient.clientFor(remoteAddress.get).send(new RemoteRequest(message, null, this.getClass.getName, timeout, supervisorUuid, true, true, false))
+ val request = RemoteRequest.newBuilder
+ .setId(RemoteRequestIdFactory.nextId)
+ .setMessage(serializer.out(message))
+ .setMessageType(message.getClass.getName)
+ .setMethod(null)
+ .setTarget(this.getClass.getName)
+ .setTimeout(timeout)
+ .setSupervisorUuid(registerSupervisorAsRemoteActor)
+ .setIsActor(true)
+ .setIsOneWay(true)
+ .setIsEscaped(false)
+ .build
+ RemoteClient.clientFor(remoteAddress.get).send(request)
} else {
val handle = new MessageInvocation(this, message, None, TransactionManagement.threadBoundTx.get)
mailbox.append(handle)
@@ -402,8 +415,19 @@ trait Actor extends Logging with TransactionManagement {
private def postMessageToMailboxAndCreateFutureResultWithTimeout(message: AnyRef, timeout: Long): CompletableFutureResult = remoteFlagLock.withReadLock { // the price you pay for being able to make an actor remote at runtime
if (remoteAddress.isDefined) {
- val supervisorUuid = registerSupervisorAsRemoteActor
- val future = RemoteClient.clientFor(remoteAddress.get).send(new RemoteRequest(message, null, this.getClass.getName, timeout, supervisorUuid, true, false, false))
+ val request = RemoteRequest.newBuilder
+ .setId(RemoteRequestIdFactory.nextId)
+ .setMessage(serializer.out(message))
+ .setMethod(null)
+ .setMessageType(message.getClass.getName)
+ .setTarget(this.getClass.getName)
+ .setTimeout(timeout)
+ .setSupervisorUuid(registerSupervisorAsRemoteActor)
+ .setIsActor(true)
+ .setIsOneWay(false)
+ .setIsEscaped(false)
+ .build
+ val future = RemoteClient.clientFor(remoteAddress.get).send(request)
if (future.isDefined) future.get
else throw new IllegalStateException("Expected a future from remote call to actor " + toString)
} else {
diff --git a/kernel/src/main/scala/nio/RemoteClient.scala b/kernel/src/main/scala/nio/RemoteClient.scala
index d080a1ae1b..da10988685 100644
--- a/kernel/src/main/scala/nio/RemoteClient.scala
+++ b/kernel/src/main/scala/nio/RemoteClient.scala
@@ -9,13 +9,13 @@ import java.util.concurrent.{Executors, ConcurrentMap, ConcurrentHashMap}
import kernel.actor.{Exit, Actor}
import kernel.reactor.{DefaultCompletableFutureResult, CompletableFutureResult}
-import kernel.util.Logging
-
+import kernel.util.{JSONSerializer, Logging}
import org.jboss.netty.channel._
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory
import org.jboss.netty.handler.codec.serialization.{ObjectEncoder, ObjectDecoder}
import org.jboss.netty.bootstrap.ClientBootstrap
+import protobuf.RemoteProtocol.RemoteReply
import scala.collection.mutable.HashMap
object RemoteClient extends Logging {
@@ -76,7 +76,7 @@ class RemoteClient(hostname: String, port: Int) extends Logging {
}
def send(request: RemoteRequest): Option[CompletableFutureResult] = if (isRunning) {
- val escapedRequest = escapeRequest(request)
+ val escapedRequest = request//escapeRequest(request)
if (escapedRequest.isOneWay) {
connection.getChannel.write(escapedRequest)
None
@@ -148,21 +148,23 @@ class RemoteClientHandler(val futures: ConcurrentMap[Long, CompletableFutureResu
val result = event.getMessage
if (result.isInstanceOf[RemoteReply]) {
val reply = result.asInstanceOf[RemoteReply]
- val future = futures.get(reply.id)
- //val tx = reply.tx
- //if (reply.successful) future.completeWithResult((reply.message, tx))
- if (reply.successful) future.completeWithResult(reply.message)
+ val future = futures.get(reply.getId)
+ val messageBytes = reply.getMessage
+ val messageType = reply.getMessageType
+ val messageClass = Class.forName(messageType)
+ val message = JSONSerializer.in(messageBytes, messageClass)
+ if (reply.successful) future.completeWithResult(message)
else {
- if (reply.supervisorUuid.isDefined) {
- val supervisorUuid = reply.supervisorUuid.get
+ val supervisorUuid = reply.getSupervisorUuid
+ if (supervisorUuid != null) {
if (!supervisors.containsKey(supervisorUuid)) throw new IllegalStateException("Expected a registered supervisor for UUID [" + supervisorUuid + "] but none was found")
val supervisedActor = supervisors.get(supervisorUuid)
if (!supervisedActor.supervisor.isDefined) throw new IllegalStateException("Can't handle restart for remote actor " + supervisedActor + " since its supervisor has been removed")
- else supervisedActor.supervisor.get ! Exit(supervisedActor, reply.exception)
+ else supervisedActor.supervisor.get ! Exit(supervisedActor, new RuntimeException(reply.getException))
}
- future.completeWithException(null, reply.exception)
+ future.completeWithException(null, new RuntimeException(reply.getException))
}
- futures.remove(reply.id)
+ futures.remove(reply.getId)
} else throw new IllegalArgumentException("Unknown message received in remote client handler: " + result)
} catch {
case e: Exception =>
diff --git a/kernel/src/main/scala/nio/RemoteServer.scala b/kernel/src/main/scala/nio/RemoteServer.scala
index 640c955965..0b7b738508 100644
--- a/kernel/src/main/scala/nio/RemoteServer.scala
+++ b/kernel/src/main/scala/nio/RemoteServer.scala
@@ -10,8 +10,7 @@ import java.util.concurrent.{ConcurrentHashMap, Executors}
import kernel.actor._
import kernel.stm.TransactionManagement
-import kernel.util.Logging
-
+import kernel.util.{JSONSerializer, Logging}
import org.jboss.netty.bootstrap.ServerBootstrap
import org.jboss.netty.channel._
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory
@@ -21,7 +20,7 @@ import org.jboss.netty.handler.codec.protobuf.{ProtobufDecoder, ProtobufEncoder}
import org.jboss.netty.handler.codec.serialization.ObjectDecoder
import org.jboss.netty.handler.codec.serialization.ObjectEncoder
-
+import protobuf.RemoteProtocol.{RemoteReply, RemoteRequest}
class RemoteServer extends Logging {
def start = RemoteServer.start
}
@@ -107,19 +106,36 @@ class AkkaServerHandler extends SimpleChannelUpstreamHandler with Logging {
log.debug("Dispatching to remote actor [%s]", request.target)
val actor = createActor(request.target, request.timeout)
actor.start
- if (request.isOneWay) actor ! request.message
+ val messageBytes = request.getMessage
+ val messageType = request.getMessageType
+ val messageClass = Class.forName(messageType)
+ val message = JSONSerializer.in(messageBytes, messageClass)
+ if (request.isOneWay) actor ! message
else {
try {
- val resultOrNone = actor !! request.message
+ val resultOrNone = actor !! message
val result: AnyRef = if (resultOrNone.isDefined) resultOrNone.get else null
log.debug("Returning result from actor invocation [%s]", result)
- //channel.write(request.newReplyWithMessage(result, TransactionManagement.threadBoundTx.get))
- channel.write(request.newReplyWithMessage(result, null))
+ val replyMessage = JSONSerializer.out(result)
+ val reply = RemoteReply.newBuilder
+ .setId(request.getId)
+ .setMessage(replyMessage)
+ .setMessageType(result.getClass.getName)
+ .setIsSuccessful(true)
+ .setSupervisorUuid(request.getSupervisorUuid)
+ .build
+ channel.write(reply)
} catch {
case e: Throwable =>
log.error("Could not invoke remote actor [%s] due to: %s", request.target, e)
e.printStackTrace
- channel.write(request.newReplyWithException(e))
+ val reply = RemoteReply.newBuilder
+ .setId(request.getId)
+ .setException(e.toString)
+ .setIsSuccessful(false)
+ .setSupervisorUuid(request.getSupervisorUuid)
+ .build
+ channel.write(reply)
}
}
}
diff --git a/kernel/src/main/scala/nio/RequestReply.scala b/kernel/src/main/scala/nio/RequestReply.scala
index 6677292e1a..3dfbe66788 100644
--- a/kernel/src/main/scala/nio/RequestReply.scala
+++ b/kernel/src/main/scala/nio/RequestReply.scala
@@ -8,13 +8,13 @@ import java.util.concurrent.atomic.AtomicLong
import kernel.stm.Transaction
import kernel.util.HashCode
-object IdFactory {
+object RemoteRequestIdFactory {
private val id = new AtomicLong
def nextId = id.getAndIncrement
}
@serializable class ProxyWrapper(val proxyName: String)
-
+/*
@serializable class RemoteRequest(val message: AnyRef,
val method: String,
val target: String,
@@ -103,4 +103,5 @@ object IdFactory {
that.asInstanceOf[RemoteRequest].supervisorUuid.isDefined == supervisorUuid.isDefined &&
that.asInstanceOf[RemoteRequest].supervisorUuid.get == supervisorUuid.get
}
-}
\ No newline at end of file
+}
+*/
\ No newline at end of file
diff --git a/lib/akka-util-java-0.5.jar b/lib/akka-util-java-0.5.jar
index a13f729b26..bfc27267b8 100644
Binary files a/lib/akka-util-java-0.5.jar and b/lib/akka-util-java-0.5.jar differ
diff --git a/lib/protobuf-java-2.0.3.jar b/lib/protobuf-java-2.0.3.jar
deleted file mode 100644
index 1165f707d9..0000000000
Binary files a/lib/protobuf-java-2.0.3.jar and /dev/null differ
diff --git a/lib/protobuf-java-2.1.0.jar b/lib/protobuf-java-2.1.0.jar
new file mode 100644
index 0000000000..961d55122a
Binary files /dev/null and b/lib/protobuf-java-2.1.0.jar differ
diff --git a/samples-java/akka-samples-java.iml b/samples-java/akka-samples-java.iml
index 70346dd5b7..36cb074182 100644
--- a/samples-java/akka-samples-java.iml
+++ b/samples-java/akka-samples-java.iml
@@ -14,7 +14,7 @@
-
+
diff --git a/samples-scala/akka-samples-scala.iml b/samples-scala/akka-samples-scala.iml
index fa56a89054..1143d932ca 100644
--- a/samples-scala/akka-samples-scala.iml
+++ b/samples-scala/akka-samples-scala.iml
@@ -14,7 +14,7 @@
-
+
diff --git a/util-java/akka-util-java.iml b/util-java/akka-util-java.iml
index 15828e48f8..1998394879 100644
--- a/util-java/akka-util-java.iml
+++ b/util-java/akka-util-java.iml
@@ -13,7 +13,7 @@
-
+
diff --git a/util-java/pom.xml b/util-java/pom.xml
index f58127b26d..7ee8202922 100644
--- a/util-java/pom.xml
+++ b/util-java/pom.xml
@@ -25,9 +25,9 @@
2.0-SNAPSHOT
- org.google.code
+ com.google.protobuf
protobuf-java
- 2.0.3
+ 2.1.0
diff --git a/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.java b/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.java
new file mode 100644
index 0000000000..ea08128b0f
--- /dev/null
+++ b/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.java
@@ -0,0 +1,1195 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+
+package se.scalablesolutions.akka.kernel.nio.protobuf;
+
+public final class RemoteProtocol {
+ private RemoteProtocol() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ public static final class RemoteRequest extends
+ com.google.protobuf.GeneratedMessage {
+ // Use RemoteRequest.newBuilder() to construct.
+ private RemoteRequest() {}
+
+ private static final RemoteRequest defaultInstance = new RemoteRequest();
+ public static RemoteRequest getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public RemoteRequest getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_descriptor;
+ }
+
+ @Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_fieldAccessorTable;
+ }
+
+ // required bytes message = 1;
+ public static final int MESSAGE_FIELD_NUMBER = 1;
+ private boolean hasMessage;
+ private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
+ public boolean hasMessage() { return hasMessage; }
+ public com.google.protobuf.ByteString getMessage() { return message_; }
+
+ // required string method = 2;
+ public static final int METHOD_FIELD_NUMBER = 2;
+ private boolean hasMethod;
+ private java.lang.String method_ = "";
+ public boolean hasMethod() { return hasMethod; }
+ public java.lang.String getMethod() { return method_; }
+
+ // required string target = 3;
+ public static final int TARGET_FIELD_NUMBER = 3;
+ private boolean hasTarget;
+ private java.lang.String target_ = "";
+ public boolean hasTarget() { return hasTarget; }
+ public java.lang.String getTarget() { return target_; }
+
+ // required uint64 timeout = 4;
+ public static final int TIMEOUT_FIELD_NUMBER = 4;
+ private boolean hasTimeout;
+ private long timeout_ = 0L;
+ public boolean hasTimeout() { return hasTimeout; }
+ public long getTimeout() { return timeout_; }
+
+ // required string supervisorUuid = 5;
+ public static final int SUPERVISORUUID_FIELD_NUMBER = 5;
+ private boolean hasSupervisorUuid;
+ private java.lang.String supervisorUuid_ = "";
+ public boolean hasSupervisorUuid() { return hasSupervisorUuid; }
+ public java.lang.String getSupervisorUuid() { return supervisorUuid_; }
+
+ // required bool isActor = 6;
+ public static final int ISACTOR_FIELD_NUMBER = 6;
+ private boolean hasIsActor;
+ private boolean isActor_ = false;
+ public boolean hasIsActor() { return hasIsActor; }
+ public boolean getIsActor() { return isActor_; }
+
+ // required bool isOneWay = 7;
+ public static final int ISONEWAY_FIELD_NUMBER = 7;
+ private boolean hasIsOneWay;
+ private boolean isOneWay_ = false;
+ public boolean hasIsOneWay() { return hasIsOneWay; }
+ public boolean getIsOneWay() { return isOneWay_; }
+
+ // required bool isEscaped = 8;
+ public static final int ISESCAPED_FIELD_NUMBER = 8;
+ private boolean hasIsEscaped;
+ private boolean isEscaped_ = false;
+ public boolean hasIsEscaped() { return hasIsEscaped; }
+ public boolean getIsEscaped() { return isEscaped_; }
+
+ // required uint64 id = 9;
+ public static final int ID_FIELD_NUMBER = 9;
+ private boolean hasId;
+ private long id_ = 0L;
+ public boolean hasId() { return hasId; }
+ public long getId() { return id_; }
+
+ // required string messageType = 10;
+ public static final int MESSAGETYPE_FIELD_NUMBER = 10;
+ private boolean hasMessageType;
+ private java.lang.String messageType_ = "";
+ public boolean hasMessageType() { return hasMessageType; }
+ public java.lang.String getMessageType() { return messageType_; }
+
+ @Override
+ public final boolean isInitialized() {
+ if (!hasMessage) return false;
+ if (!hasMethod) return false;
+ if (!hasTarget) return false;
+ if (!hasTimeout) return false;
+ if (!hasSupervisorUuid) return false;
+ if (!hasIsActor) return false;
+ if (!hasIsOneWay) return false;
+ if (!hasIsEscaped) return false;
+ if (!hasId) return false;
+ if (!hasMessageType) return false;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (hasMessage()) {
+ output.writeBytes(1, getMessage());
+ }
+ if (hasMethod()) {
+ output.writeString(2, getMethod());
+ }
+ if (hasTarget()) {
+ output.writeString(3, getTarget());
+ }
+ if (hasTimeout()) {
+ output.writeUInt64(4, getTimeout());
+ }
+ if (hasSupervisorUuid()) {
+ output.writeString(5, getSupervisorUuid());
+ }
+ if (hasIsActor()) {
+ output.writeBool(6, getIsActor());
+ }
+ if (hasIsOneWay()) {
+ output.writeBool(7, getIsOneWay());
+ }
+ if (hasIsEscaped()) {
+ output.writeBool(8, getIsEscaped());
+ }
+ if (hasId()) {
+ output.writeUInt64(9, getId());
+ }
+ if (hasMessageType()) {
+ output.writeString(10, getMessageType());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasMessage()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, getMessage());
+ }
+ if (hasMethod()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(2, getMethod());
+ }
+ if (hasTarget()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(3, getTarget());
+ }
+ if (hasTimeout()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(4, getTimeout());
+ }
+ if (hasSupervisorUuid()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(5, getSupervisorUuid());
+ }
+ if (hasIsActor()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(6, getIsActor());
+ }
+ if (hasIsOneWay()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(7, getIsOneWay());
+ }
+ if (hasIsEscaped()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(8, getIsEscaped());
+ }
+ if (hasId()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(9, getId());
+ }
+ if (hasMessageType()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(10, getMessageType());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeDelimitedFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+
+ public static Builder newBuilder() { return new Builder(); }
+ public Builder newBuilderForType() { return new Builder(); }
+ public static Builder newBuilder(se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest prototype) {
+ return new Builder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder {
+ // Construct using se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.newBuilder()
+ private Builder() {}
+
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest result = new se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest();
+
+ @Override
+ protected se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest internalGetResult() {
+ return result;
+ }
+
+ @Override
+ public Builder clear() {
+ result = new se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest();
+ return this;
+ }
+
+ @Override
+ public Builder clone() {
+ return new Builder().mergeFrom(result);
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.getDescriptor();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest getDefaultInstanceForType() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.getDefaultInstance();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest build() {
+ if (result != null && !isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result);
+ }
+ return buildPartial();
+ }
+
+ private se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest buildParsed()
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result).asInvalidProtocolBufferException();
+ }
+ return buildPartial();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest buildPartial() {
+ if (result == null) {
+ throw new IllegalStateException(
+ "build() has already been called on this Builder."); }
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest returnMe = result;
+ result = null;
+ return returnMe;
+ }
+
+ @Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest) {
+ return mergeFrom((se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest other) {
+ if (other == se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.getDefaultInstance()) return this;
+ if (other.hasMessage()) {
+ setMessage(other.getMessage());
+ }
+ if (other.hasMethod()) {
+ setMethod(other.getMethod());
+ }
+ if (other.hasTarget()) {
+ setTarget(other.getTarget());
+ }
+ if (other.hasTimeout()) {
+ setTimeout(other.getTimeout());
+ }
+ if (other.hasSupervisorUuid()) {
+ setSupervisorUuid(other.getSupervisorUuid());
+ }
+ if (other.hasIsActor()) {
+ setIsActor(other.getIsActor());
+ }
+ if (other.hasIsOneWay()) {
+ setIsOneWay(other.getIsOneWay());
+ }
+ if (other.hasIsEscaped()) {
+ setIsEscaped(other.getIsEscaped());
+ }
+ if (other.hasId()) {
+ setId(other.getId());
+ }
+ if (other.hasMessageType()) {
+ setMessageType(other.getMessageType());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return mergeFrom(input,
+ com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
+ }
+
+ @Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder(
+ this.getUnknownFields());
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ }
+ break;
+ }
+ case 10: {
+ setMessage(input.readBytes());
+ break;
+ }
+ case 18: {
+ setMethod(input.readString());
+ break;
+ }
+ case 26: {
+ setTarget(input.readString());
+ break;
+ }
+ case 32: {
+ setTimeout(input.readUInt64());
+ break;
+ }
+ case 42: {
+ setSupervisorUuid(input.readString());
+ break;
+ }
+ case 48: {
+ setIsActor(input.readBool());
+ break;
+ }
+ case 56: {
+ setIsOneWay(input.readBool());
+ break;
+ }
+ case 64: {
+ setIsEscaped(input.readBool());
+ break;
+ }
+ case 72: {
+ setId(input.readUInt64());
+ break;
+ }
+ case 82: {
+ setMessageType(input.readString());
+ break;
+ }
+ }
+ }
+ }
+
+
+ // required bytes message = 1;
+ public boolean hasMessage() {
+ return result.hasMessage();
+ }
+ public com.google.protobuf.ByteString getMessage() {
+ return result.getMessage();
+ }
+ public Builder setMessage(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasMessage = true;
+ result.message_ = value;
+ return this;
+ }
+ public Builder clearMessage() {
+ result.hasMessage = false;
+ result.message_ = com.google.protobuf.ByteString.EMPTY;
+ return this;
+ }
+
+ // required string method = 2;
+ public boolean hasMethod() {
+ return result.hasMethod();
+ }
+ public java.lang.String getMethod() {
+ return result.getMethod();
+ }
+ public Builder setMethod(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasMethod = true;
+ result.method_ = value;
+ return this;
+ }
+ public Builder clearMethod() {
+ result.hasMethod = false;
+ result.method_ = "";
+ return this;
+ }
+
+ // required string target = 3;
+ public boolean hasTarget() {
+ return result.hasTarget();
+ }
+ public java.lang.String getTarget() {
+ return result.getTarget();
+ }
+ public Builder setTarget(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasTarget = true;
+ result.target_ = value;
+ return this;
+ }
+ public Builder clearTarget() {
+ result.hasTarget = false;
+ result.target_ = "";
+ return this;
+ }
+
+ // required uint64 timeout = 4;
+ public boolean hasTimeout() {
+ return result.hasTimeout();
+ }
+ public long getTimeout() {
+ return result.getTimeout();
+ }
+ public Builder setTimeout(long value) {
+ result.hasTimeout = true;
+ result.timeout_ = value;
+ return this;
+ }
+ public Builder clearTimeout() {
+ result.hasTimeout = false;
+ result.timeout_ = 0L;
+ return this;
+ }
+
+ // required string supervisorUuid = 5;
+ public boolean hasSupervisorUuid() {
+ return result.hasSupervisorUuid();
+ }
+ public java.lang.String getSupervisorUuid() {
+ return result.getSupervisorUuid();
+ }
+ public Builder setSupervisorUuid(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasSupervisorUuid = true;
+ result.supervisorUuid_ = value;
+ return this;
+ }
+ public Builder clearSupervisorUuid() {
+ result.hasSupervisorUuid = false;
+ result.supervisorUuid_ = "";
+ return this;
+ }
+
+ // required bool isActor = 6;
+ public boolean hasIsActor() {
+ return result.hasIsActor();
+ }
+ public boolean getIsActor() {
+ return result.getIsActor();
+ }
+ public Builder setIsActor(boolean value) {
+ result.hasIsActor = true;
+ result.isActor_ = value;
+ return this;
+ }
+ public Builder clearIsActor() {
+ result.hasIsActor = false;
+ result.isActor_ = false;
+ return this;
+ }
+
+ // required bool isOneWay = 7;
+ public boolean hasIsOneWay() {
+ return result.hasIsOneWay();
+ }
+ public boolean getIsOneWay() {
+ return result.getIsOneWay();
+ }
+ public Builder setIsOneWay(boolean value) {
+ result.hasIsOneWay = true;
+ result.isOneWay_ = value;
+ return this;
+ }
+ public Builder clearIsOneWay() {
+ result.hasIsOneWay = false;
+ result.isOneWay_ = false;
+ return this;
+ }
+
+ // required bool isEscaped = 8;
+ public boolean hasIsEscaped() {
+ return result.hasIsEscaped();
+ }
+ public boolean getIsEscaped() {
+ return result.getIsEscaped();
+ }
+ public Builder setIsEscaped(boolean value) {
+ result.hasIsEscaped = true;
+ result.isEscaped_ = value;
+ return this;
+ }
+ public Builder clearIsEscaped() {
+ result.hasIsEscaped = false;
+ result.isEscaped_ = false;
+ return this;
+ }
+
+ // required uint64 id = 9;
+ public boolean hasId() {
+ return result.hasId();
+ }
+ public long getId() {
+ return result.getId();
+ }
+ public Builder setId(long value) {
+ result.hasId = true;
+ result.id_ = value;
+ return this;
+ }
+ public Builder clearId() {
+ result.hasId = false;
+ result.id_ = 0L;
+ return this;
+ }
+
+ // required string messageType = 10;
+ public boolean hasMessageType() {
+ return result.hasMessageType();
+ }
+ public java.lang.String getMessageType() {
+ return result.getMessageType();
+ }
+ public Builder setMessageType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasMessageType = true;
+ result.messageType_ = value;
+ return this;
+ }
+ public Builder clearMessageType() {
+ result.hasMessageType = false;
+ result.messageType_ = "";
+ return this;
+ }
+ }
+
+ static {
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.getDescriptor();
+ }
+ }
+
+ public static final class RemoteReply extends
+ com.google.protobuf.GeneratedMessage {
+ // Use RemoteReply.newBuilder() to construct.
+ private RemoteReply() {}
+
+ private static final RemoteReply defaultInstance = new RemoteReply();
+ public static RemoteReply getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public RemoteReply getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_descriptor;
+ }
+
+ @Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_fieldAccessorTable;
+ }
+
+ // required bool isSuccessful = 1;
+ public static final int ISSUCCESSFUL_FIELD_NUMBER = 1;
+ private boolean hasIsSuccessful;
+ private boolean isSuccessful_ = false;
+ public boolean hasIsSuccessful() { return hasIsSuccessful; }
+ public boolean getIsSuccessful() { return isSuccessful_; }
+
+ // required uint64 id = 2;
+ public static final int ID_FIELD_NUMBER = 2;
+ private boolean hasId;
+ private long id_ = 0L;
+ public boolean hasId() { return hasId; }
+ public long getId() { return id_; }
+
+ // required bytes message = 3;
+ public static final int MESSAGE_FIELD_NUMBER = 3;
+ private boolean hasMessage;
+ private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
+ public boolean hasMessage() { return hasMessage; }
+ public com.google.protobuf.ByteString getMessage() { return message_; }
+
+ // required string exception = 4;
+ public static final int EXCEPTION_FIELD_NUMBER = 4;
+ private boolean hasException;
+ private java.lang.String exception_ = "";
+ public boolean hasException() { return hasException; }
+ public java.lang.String getException() { return exception_; }
+
+ // required string supervisorUuid = 5;
+ public static final int SUPERVISORUUID_FIELD_NUMBER = 5;
+ private boolean hasSupervisorUuid;
+ private java.lang.String supervisorUuid_ = "";
+ public boolean hasSupervisorUuid() { return hasSupervisorUuid; }
+ public java.lang.String getSupervisorUuid() { return supervisorUuid_; }
+
+ // required string messageType = 6;
+ public static final int MESSAGETYPE_FIELD_NUMBER = 6;
+ private boolean hasMessageType;
+ private java.lang.String messageType_ = "";
+ public boolean hasMessageType() { return hasMessageType; }
+ public java.lang.String getMessageType() { return messageType_; }
+
+ @Override
+ public final boolean isInitialized() {
+ if (!hasIsSuccessful) return false;
+ if (!hasId) return false;
+ if (!hasMessage) return false;
+ if (!hasException) return false;
+ if (!hasSupervisorUuid) return false;
+ if (!hasMessageType) return false;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (hasIsSuccessful()) {
+ output.writeBool(1, getIsSuccessful());
+ }
+ if (hasId()) {
+ output.writeUInt64(2, getId());
+ }
+ if (hasMessage()) {
+ output.writeBytes(3, getMessage());
+ }
+ if (hasException()) {
+ output.writeString(4, getException());
+ }
+ if (hasSupervisorUuid()) {
+ output.writeString(5, getSupervisorUuid());
+ }
+ if (hasMessageType()) {
+ output.writeString(6, getMessageType());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasIsSuccessful()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(1, getIsSuccessful());
+ }
+ if (hasId()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(2, getId());
+ }
+ if (hasMessage()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, getMessage());
+ }
+ if (hasException()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(4, getException());
+ }
+ if (hasSupervisorUuid()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(5, getSupervisorUuid());
+ }
+ if (hasMessageType()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(6, getMessageType());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeDelimitedFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+
+ public static Builder newBuilder() { return new Builder(); }
+ public Builder newBuilderForType() { return new Builder(); }
+ public static Builder newBuilder(se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply prototype) {
+ return new Builder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder {
+ // Construct using se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.newBuilder()
+ private Builder() {}
+
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply result = new se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply();
+
+ @Override
+ protected se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply internalGetResult() {
+ return result;
+ }
+
+ @Override
+ public Builder clear() {
+ result = new se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply();
+ return this;
+ }
+
+ @Override
+ public Builder clone() {
+ return new Builder().mergeFrom(result);
+ }
+
+ @Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.getDescriptor();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply getDefaultInstanceForType() {
+ return se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.getDefaultInstance();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply build() {
+ if (result != null && !isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result);
+ }
+ return buildPartial();
+ }
+
+ private se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply buildParsed()
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result).asInvalidProtocolBufferException();
+ }
+ return buildPartial();
+ }
+
+ public se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply buildPartial() {
+ if (result == null) {
+ throw new IllegalStateException(
+ "build() has already been called on this Builder."); }
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply returnMe = result;
+ result = null;
+ return returnMe;
+ }
+
+ @Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply) {
+ return mergeFrom((se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply other) {
+ if (other == se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.getDefaultInstance()) return this;
+ if (other.hasIsSuccessful()) {
+ setIsSuccessful(other.getIsSuccessful());
+ }
+ if (other.hasId()) {
+ setId(other.getId());
+ }
+ if (other.hasMessage()) {
+ setMessage(other.getMessage());
+ }
+ if (other.hasException()) {
+ setException(other.getException());
+ }
+ if (other.hasSupervisorUuid()) {
+ setSupervisorUuid(other.getSupervisorUuid());
+ }
+ if (other.hasMessageType()) {
+ setMessageType(other.getMessageType());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return mergeFrom(input,
+ com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
+ }
+
+ @Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder(
+ this.getUnknownFields());
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ }
+ break;
+ }
+ case 8: {
+ setIsSuccessful(input.readBool());
+ break;
+ }
+ case 16: {
+ setId(input.readUInt64());
+ break;
+ }
+ case 26: {
+ setMessage(input.readBytes());
+ break;
+ }
+ case 34: {
+ setException(input.readString());
+ break;
+ }
+ case 42: {
+ setSupervisorUuid(input.readString());
+ break;
+ }
+ case 50: {
+ setMessageType(input.readString());
+ break;
+ }
+ }
+ }
+ }
+
+
+ // required bool isSuccessful = 1;
+ public boolean hasIsSuccessful() {
+ return result.hasIsSuccessful();
+ }
+ public boolean getIsSuccessful() {
+ return result.getIsSuccessful();
+ }
+ public Builder setIsSuccessful(boolean value) {
+ result.hasIsSuccessful = true;
+ result.isSuccessful_ = value;
+ return this;
+ }
+ public Builder clearIsSuccessful() {
+ result.hasIsSuccessful = false;
+ result.isSuccessful_ = false;
+ return this;
+ }
+
+ // required uint64 id = 2;
+ public boolean hasId() {
+ return result.hasId();
+ }
+ public long getId() {
+ return result.getId();
+ }
+ public Builder setId(long value) {
+ result.hasId = true;
+ result.id_ = value;
+ return this;
+ }
+ public Builder clearId() {
+ result.hasId = false;
+ result.id_ = 0L;
+ return this;
+ }
+
+ // required bytes message = 3;
+ public boolean hasMessage() {
+ return result.hasMessage();
+ }
+ public com.google.protobuf.ByteString getMessage() {
+ return result.getMessage();
+ }
+ public Builder setMessage(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasMessage = true;
+ result.message_ = value;
+ return this;
+ }
+ public Builder clearMessage() {
+ result.hasMessage = false;
+ result.message_ = com.google.protobuf.ByteString.EMPTY;
+ return this;
+ }
+
+ // required string exception = 4;
+ public boolean hasException() {
+ return result.hasException();
+ }
+ public java.lang.String getException() {
+ return result.getException();
+ }
+ public Builder setException(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasException = true;
+ result.exception_ = value;
+ return this;
+ }
+ public Builder clearException() {
+ result.hasException = false;
+ result.exception_ = "";
+ return this;
+ }
+
+ // required string supervisorUuid = 5;
+ public boolean hasSupervisorUuid() {
+ return result.hasSupervisorUuid();
+ }
+ public java.lang.String getSupervisorUuid() {
+ return result.getSupervisorUuid();
+ }
+ public Builder setSupervisorUuid(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasSupervisorUuid = true;
+ result.supervisorUuid_ = value;
+ return this;
+ }
+ public Builder clearSupervisorUuid() {
+ result.hasSupervisorUuid = false;
+ result.supervisorUuid_ = "";
+ return this;
+ }
+
+ // required string messageType = 6;
+ public boolean hasMessageType() {
+ return result.hasMessageType();
+ }
+ public java.lang.String getMessageType() {
+ return result.getMessageType();
+ }
+ public Builder setMessageType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ result.hasMessageType = true;
+ result.messageType_ = value;
+ return this;
+ }
+ public Builder clearMessageType() {
+ result.hasMessageType = false;
+ result.messageType_ = "";
+ return this;
+ }
+ }
+
+ static {
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.getDescriptor();
+ }
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String descriptorData =
+ "\nBse/scalablesolutions/akka/kernel/nio/p" +
+ "rotobuf/RemoteProtocol.proto\022-se.scalabl" +
+ "esolutions.akka.kernel.nio.protobuf\"\300\001\n\r" +
+ "RemoteRequest\022\017\n\007message\030\001 \002(\014\022\016\n\006method" +
+ "\030\002 \002(\t\022\016\n\006target\030\003 \002(\t\022\017\n\007timeout\030\004 \002(\004\022" +
+ "\026\n\016supervisorUuid\030\005 \002(\t\022\017\n\007isActor\030\006 \002(\010" +
+ "\022\020\n\010isOneWay\030\007 \002(\010\022\021\n\tisEscaped\030\010 \002(\010\022\n\n" +
+ "\002id\030\t \002(\004\022\023\n\013messageType\030\n \002(\t\"\200\001\n\013Remot" +
+ "eReply\022\024\n\014isSuccessful\030\001 \002(\010\022\n\n\002id\030\002 \002(\004" +
+ "\022\017\n\007message\030\003 \002(\014\022\021\n\texception\030\004 \002(\t\022\026\n\016" +
+ "supervisorUuid\030\005 \002(\t\022\023\n\013messageType\030\006 \002(" +
+ "\tB\002H\001";
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteRequest_descriptor,
+ new java.lang.String[] { "Message", "Method", "Target", "Timeout", "SupervisorUuid", "IsActor", "IsOneWay", "IsEscaped", "Id", "MessageType", },
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.class,
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteRequest.Builder.class);
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_se_scalablesolutions_akka_kernel_nio_protobuf_RemoteReply_descriptor,
+ new java.lang.String[] { "IsSuccessful", "Id", "Message", "Exception", "SupervisorUuid", "MessageType", },
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.class,
+ se.scalablesolutions.akka.kernel.nio.protobuf.RemoteProtocol.RemoteReply.Builder.class);
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ }
+}
diff --git a/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.proto b/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.proto
index a2002bb06d..f08f303184 100644
--- a/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.proto
+++ b/util-java/src/main/java/se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.proto
@@ -13,6 +13,7 @@ package se.scalablesolutions.akka.kernel.nio.protobuf;
option optimize_for = SPEED;
/*
+val id: Long,
val message: Array[Byte],
val method: String,
val target: String,
@@ -31,6 +32,8 @@ message RemoteRequest {
required bool isActor = 6;
required bool isOneWay = 7;
required bool isEscaped = 8;
+ required uint64 id = 9;
+ required string messageType = 10;
}
/*
@@ -46,4 +49,5 @@ message RemoteReply {
required bytes message = 3;
required string exception = 4;
required string supervisorUuid = 5;
+ required string messageType = 6;
}
\ No newline at end of file