diff --git a/akka-actors/src/main/scala/actor/ActiveObject.scala b/akka-actors/src/main/scala/actor/ActiveObject.scala index 983d3231485..566e2a9f413 100644 --- a/akka-actors/src/main/scala/actor/ActiveObject.scala +++ b/akka-actors/src/main/scala/actor/ActiveObject.scala @@ -204,6 +204,7 @@ private[akka] sealed class ActiveObjectAspect { .setId(RemoteRequestIdFactory.nextId) .setMethod(rtti.getMethod.getName) .setTarget(target.getName) + .setUuid(actor.uuid) .setTimeout(timeout) .setIsActor(false) .setIsOneWay(oneWay_?) diff --git a/akka-actors/src/main/scala/actor/Actor.scala b/akka-actors/src/main/scala/actor/Actor.scala index de1cb5fba6e..bc7a8806f3d 100644 --- a/akka-actors/src/main/scala/actor/Actor.scala +++ b/akka-actors/src/main/scala/actor/Actor.scala @@ -101,13 +101,14 @@ trait Actor extends Logging with TransactionManagement { implicit val self: AnyRef = this // FIXME http://www.assembla.com/spaces/akka/tickets/56-Change-UUID-generation-for-the-TransactionManagement-trait - val uuid = Uuid.newUuid.toString - + private[akka] var _uuid = Uuid.newUuid.toString + def uuid = _uuid + // ==================================== // private fields // ==================================== - @volatile private var _isRunning: Boolean = false + @volatile private var _isRunning: Boolean = false @volatile private var _isShutDown: Boolean = false private var _hotswap: Option[PartialFunction[Any, Unit]] = None private var _config: Option[AnyRef] = None @@ -346,6 +347,9 @@ trait Actor extends Logging with TransactionManagement { "Actor has not been started, you need to invoke 'actor.start' before using it") } + /** + * Same as the '!' method but does not take an implicit sender as second parameter. + */ def send(message: AnyRef) = { if (_isRunning) postMessageToMailbox(message, None) else throw new IllegalStateException( @@ -394,17 +398,10 @@ trait Actor extends Logging with TransactionManagement { def !![T](message: AnyRef): Option[T] = !![T](message, timeout) /** - * Sends a message asynchronously, but waits on a future indefinitely. E.g. emulates a synchronous call. - *

- * NOTE: - * Should be used with care (almost never), since very dangerous (will block a thread indefinitely if no reply). + * This method is evil and have been removed. Use '!!' with a timeout instead. */ - def !?[T](message: AnyRef): T = if (_isRunning) { - val future = postMessageToMailboxAndCreateFutureResultWithTimeout(message, 0) - future.awaitBlocking - getResultOrThrowException(future).get - } else throw new IllegalStateException( - "Actor has not been started, you need to invoke 'actor.start' before using it") + def !?[T](message: AnyRef): T = throw new UnsupportedOperationException( + "'!?' is evil and have been removed. Use '!!' with a timeout instead") /** * Use reply(..) to reply with a message to the original sender of the message currently @@ -596,6 +593,7 @@ trait Actor extends Logging with TransactionManagement { .setId(RemoteRequestIdFactory.nextId) .setTarget(this.getClass.getName) .setTimeout(timeout) + .setUuid(uuid) .setIsActor(true) .setIsOneWay(true) .setIsEscaped(false) @@ -615,6 +613,7 @@ trait Actor extends Logging with TransactionManagement { .setId(RemoteRequestIdFactory.nextId) .setTarget(this.getClass.getName) .setTimeout(timeout) + .setUuid(uuid) .setIsActor(true) .setIsOneWay(false) .setIsEscaped(false) diff --git a/akka-actors/src/main/scala/nio/RemoteClient.scala b/akka-actors/src/main/scala/nio/RemoteClient.scala index 4e1a777181f..06c744a37c4 100644 --- a/akka-actors/src/main/scala/nio/RemoteClient.scala +++ b/akka-actors/src/main/scala/nio/RemoteClient.scala @@ -148,7 +148,8 @@ class RemoteClientHandler(val name: String, extends SimpleChannelUpstreamHandler with Logging { override def handleUpstream(ctx: ChannelHandlerContext, event: ChannelEvent) = { - if (event.isInstanceOf[ChannelStateEvent] && event.asInstanceOf[ChannelStateEvent].getState != ChannelState.INTEREST_OPS) { + if (event.isInstanceOf[ChannelStateEvent] && + event.asInstanceOf[ChannelStateEvent].getState != ChannelState.INTEREST_OPS) { log.debug(event.toString) } super.handleUpstream(ctx, event) diff --git a/akka-actors/src/main/scala/nio/RemoteServer.scala b/akka-actors/src/main/scala/nio/RemoteServer.scala index 635b231e52c..23bfbfa1876 100755 --- a/akka-actors/src/main/scala/nio/RemoteServer.scala +++ b/akka-actors/src/main/scala/nio/RemoteServer.scala @@ -67,7 +67,8 @@ object RemoteServer extends Logging { /** * @author Jonas Bonér */ -class RemoteServerPipelineFactory(name: String, loader: Option[ClassLoader]) extends ChannelPipelineFactory { +class RemoteServerPipelineFactory(name: String, loader: Option[ClassLoader]) + extends ChannelPipelineFactory { def getPipeline: ChannelPipeline = { val p = Channels.pipeline() p.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4)) @@ -83,12 +84,14 @@ class RemoteServerPipelineFactory(name: String, loader: Option[ClassLoader]) ext * @author Jonas Bonér */ @ChannelPipelineCoverage { val value = "all" } -class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassLoader]) extends SimpleChannelUpstreamHandler with Logging { +class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassLoader]) + extends SimpleChannelUpstreamHandler with Logging { private val activeObjects = new ConcurrentHashMap[String, AnyRef] private val actors = new ConcurrentHashMap[String, Actor] override def handleUpstream(ctx: ChannelHandlerContext, event: ChannelEvent) = { - if (event.isInstanceOf[ChannelStateEvent] && event.asInstanceOf[ChannelStateEvent].getState != ChannelState.INTEREST_OPS) { + if (event.isInstanceOf[ChannelStateEvent] && + event.asInstanceOf[ChannelStateEvent].getState != ChannelState.INTEREST_OPS) { log.debug(event.toString) } super.handleUpstream(ctx, event) @@ -96,8 +99,11 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) = { val message = event.getMessage - if (message == null) throw new IllegalStateException("Message in remote MessageEvent is null: " + event) - if (message.isInstanceOf[RemoteRequest]) handleRemoteRequest(message.asInstanceOf[RemoteRequest], event.getChannel) + if (message == null) throw new IllegalStateException( + "Message in remote MessageEvent is null: " + event) + if (message.isInstanceOf[RemoteRequest]) { + handleRemoteRequest(message.asInstanceOf[RemoteRequest], event.getChannel) + } } override def exceptionCaught(ctx: ChannelHandlerContext, event: ExceptionEvent) = { @@ -115,7 +121,7 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL private def dispatchToActor(request: RemoteRequest, channel: Channel) = { import Actor._ log.debug("Dispatching to remote actor [%s]", request.getTarget) - val actor = createActor(request.getTarget, request.getTimeout) + val actor = createActor(request.getTarget, request.getUuid, request.getTimeout) actor.start val message = RemoteProtocolBuilder.getMessage(request) if (request.getIsOneWay) actor ! message @@ -158,7 +164,8 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL //continueTransaction(request) try { - val messageReceiver = activeObject.getClass.getDeclaredMethod(request.getMethod, unescapedArgClasses: _*) + val messageReceiver = activeObject.getClass.getDeclaredMethod( + request.getMethod, unescapedArgClasses: _*) if (request.getIsOneWay) messageReceiver.invoke(activeObject, unescapedArgs: _*) else { val result = messageReceiver.invoke(activeObject, unescapedArgs: _*) @@ -174,7 +181,9 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL } } catch { case e: InvocationTargetException => - log.error("Could not invoke remote active object [%s :: %s] due to: %s", request.getMethod, request.getTarget, e.getCause) + log.error( + "Could not invoke remote active object [%s :: %s] due to: %s", + request.getMethod, request.getTarget, e.getCause) e.getCause.printStackTrace val replyBuilder = RemoteReply.newBuilder .setId(request.getId) @@ -185,7 +194,9 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL val replyMessage = replyBuilder.build channel.write(replyMessage) case e: Throwable => - log.error("Could not invoke remote active object [%s :: %s] due to: %s", request.getMethod, request.getTarget, e) + log.error( + "Could not invoke remote active object [%s :: %s] due to: %s", + request.getMethod, request.getTarget, e) e.printStackTrace val replyBuilder = RemoteReply.newBuilder .setId(request.getId) @@ -250,21 +261,22 @@ class RemoteServerHandler(val name: String, val applicationLoader: Option[ClassL } else activeObjectOrNull } - private def createActor(name: String, timeout: Long): Actor = { - val actorOrNull = actors.get(name) + private def createActor(name: String, uuid: String, timeout: Long): Actor = { + val actorOrNull = actors.get(uuid) if (actorOrNull == null) { try { - log.info("Creating a new remote actor [%s]", name) + log.info("Creating a new remote actor [%s:%s]", name, uuid) val clazz = if (applicationLoader.isDefined) applicationLoader.get.loadClass(name) else Class.forName(name) val newInstance = clazz.newInstance.asInstanceOf[Actor] + newInstance._uuid = uuid newInstance.timeout = timeout newInstance._remoteAddress = None - actors.put(name, newInstance) + actors.put(uuid, newInstance) newInstance } catch { case e => - log.debug("Could not create remote actor instance due to: %s", e) + log.error(e, "Could not create remote actor instance due to: " + e.getMessage) e.printStackTrace throw e } diff --git a/akka-actors/src/test/scala/EventBasedSingleThreadActorTest.scala b/akka-actors/src/test/scala/EventBasedSingleThreadActorTest.scala index bd7389e676a..46661e3b978 100644 --- a/akka-actors/src/test/scala/EventBasedSingleThreadActorTest.scala +++ b/akka-actors/src/test/scala/EventBasedSingleThreadActorTest.scala @@ -41,7 +41,7 @@ class EventBasedSingleThreadActorTest extends JUnitSuite { implicit val timeout = 5000L val actor = new TestActor actor.start - val result: String = actor !? "Hello" + val result: String = (actor !! ("Hello", 10000)).get assert("World" === result) actor.stop } diff --git a/akka-actors/src/test/scala/EventBasedThreadPoolActorTest.scala b/akka-actors/src/test/scala/EventBasedThreadPoolActorTest.scala index 55345ec25e7..2030942b7aa 100644 --- a/akka-actors/src/test/scala/EventBasedThreadPoolActorTest.scala +++ b/akka-actors/src/test/scala/EventBasedThreadPoolActorTest.scala @@ -37,7 +37,7 @@ class EventBasedThreadPoolActorTest extends JUnitSuite { implicit val timeout = 5000L val actor = new TestActor actor.start - val result: String = actor !? "Hello" + val result: String = (actor !! ("Hello", 10000)).get assert("World" === result) actor.stop } diff --git a/akka-actors/src/test/scala/RemoteActorTest.scala b/akka-actors/src/test/scala/RemoteActorTest.scala index bea33a50d92..191898269bd 100644 --- a/akka-actors/src/test/scala/RemoteActorTest.scala +++ b/akka-actors/src/test/scala/RemoteActorTest.scala @@ -50,17 +50,6 @@ class RemoteActorTest extends JUnitSuite { actor.stop } - @Test - def shouldSendReplySync = { - implicit val timeout = 500000000L - val actor = new RemoteActorSpecActorBidirectional - actor.makeRemote(RemoteServer.HOSTNAME, RemoteServer.PORT) - actor.start - val result: String = actor !? "Hello" - assert("World" === result) - actor.stop - } - @Test def shouldSendReplyAsync = { implicit val timeout = 500000000L diff --git a/akka-actors/src/test/scala/ThreadBasedActorTest.scala b/akka-actors/src/test/scala/ThreadBasedActorTest.scala index dca6634acc1..335a6f461b4 100644 --- a/akka-actors/src/test/scala/ThreadBasedActorTest.scala +++ b/akka-actors/src/test/scala/ThreadBasedActorTest.scala @@ -41,7 +41,7 @@ class ThreadBasedActorTest extends JUnitSuite { implicit val timeout = 5000L val actor = new TestActor actor.start - val result: String = actor !? "Hello" + val result: String = (actor !! ("Hello", 10000)).get assert("World" === result) actor.stop } diff --git a/akka-security/src/main/scala/Security.scala b/akka-security/src/main/scala/Security.scala index c8964cb5069..384af1ea203 100644 --- a/akka-security/src/main/scala/Security.scala +++ b/akka-security/src/main/scala/Security.scala @@ -86,7 +86,7 @@ class AkkaSecurityFilterFactory extends ResourceFilterFactory with Logging { override def filter(request: ContainerRequest): ContainerRequest = rolesAllowed match { case Some(roles) => { - (authenticator !? Authenticate(request, roles)).asInstanceOf[AnyRef] match { + (authenticator !! (Authenticate(request, roles), 10000)).get.asInstanceOf[AnyRef] match { case OK => request case r if r.isInstanceOf[Response] => throw new WebApplicationException(r.asInstanceOf[Response]) diff --git a/akka-security/src/test/scala/SecuritySpec.scala b/akka-security/src/test/scala/SecuritySpec.scala index 880f26693c7..feabd8f4745 100644 --- a/akka-security/src/test/scala/SecuritySpec.scala +++ b/akka-security/src/test/scala/SecuritySpec.scala @@ -26,7 +26,7 @@ class BasicAuthenticatorSpec extends junit.framework.TestCase @Test def testChallenge = { val req = mock[ContainerRequest] - val result: Response = (authenticator !? Authenticate(req, List("foo"))) + val result: Response = (authenticator !! (Authenticate(req, List("foo")), 10000)).get // the actor replies with a challenge for the browser result.getStatus must equal(Response.Status.UNAUTHORIZED.getStatusCode) @@ -41,7 +41,7 @@ class BasicAuthenticatorSpec extends junit.framework.TestCase // fake a request authorization -> this will authorize the user when(req.isUserInRole("chef")).thenReturn(true) - val result: AnyRef = (authenticator !? Authenticate(req, List("chef"))) + val result: AnyRef = (authenticator !! (Authenticate(req, List("chef")), 10000)).get result must be(OK) // the authenticator must have set a security context @@ -55,7 +55,7 @@ class BasicAuthenticatorSpec extends junit.framework.TestCase when(req.getHeaderValue("Authorization")).thenReturn("Basic " + new String(Base64.encode("foo:bar"))) when(req.isUserInRole("chef")).thenReturn(false) // this will deny access - val result: Response = (authenticator !? Authenticate(req, List("chef"))) + val result: Response = (authenticator !! (Authenticate(req, List("chef")), 10000)).get result.getStatus must equal(Response.Status.FORBIDDEN.getStatusCode) diff --git a/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.java b/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.java index b956e77c96a..950cfeb9186 100644 --- a/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.java +++ b/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.java @@ -73,36 +73,43 @@ public RemoteRequest getDefaultInstanceForType() { public boolean hasTarget() { return hasTarget; } public java.lang.String getTarget() { return target_; } - // required uint64 timeout = 7; - public static final int TIMEOUT_FIELD_NUMBER = 7; + // required string uuid = 7; + public static final int UUID_FIELD_NUMBER = 7; + private boolean hasUuid; + private java.lang.String uuid_ = ""; + public boolean hasUuid() { return hasUuid; } + public java.lang.String getUuid() { return uuid_; } + + // required uint64 timeout = 8; + public static final int TIMEOUT_FIELD_NUMBER = 8; private boolean hasTimeout; private long timeout_ = 0L; public boolean hasTimeout() { return hasTimeout; } public long getTimeout() { return timeout_; } - // optional string supervisorUuid = 8; - public static final int SUPERVISORUUID_FIELD_NUMBER = 8; + // optional string supervisorUuid = 9; + public static final int SUPERVISORUUID_FIELD_NUMBER = 9; private boolean hasSupervisorUuid; private java.lang.String supervisorUuid_ = ""; public boolean hasSupervisorUuid() { return hasSupervisorUuid; } public java.lang.String getSupervisorUuid() { return supervisorUuid_; } - // required bool isActor = 9; - public static final int ISACTOR_FIELD_NUMBER = 9; + // required bool isActor = 10; + public static final int ISACTOR_FIELD_NUMBER = 10; private boolean hasIsActor; private boolean isActor_ = false; public boolean hasIsActor() { return hasIsActor; } public boolean getIsActor() { return isActor_; } - // required bool isOneWay = 10; - public static final int ISONEWAY_FIELD_NUMBER = 10; + // required bool isOneWay = 11; + public static final int ISONEWAY_FIELD_NUMBER = 11; private boolean hasIsOneWay; private boolean isOneWay_ = false; public boolean hasIsOneWay() { return hasIsOneWay; } public boolean getIsOneWay() { return isOneWay_; } - // required bool isEscaped = 11; - public static final int ISESCAPED_FIELD_NUMBER = 11; + // required bool isEscaped = 12; + public static final int ISESCAPED_FIELD_NUMBER = 12; private boolean hasIsEscaped; private boolean isEscaped_ = false; public boolean hasIsEscaped() { return hasIsEscaped; } @@ -113,6 +120,7 @@ public final boolean isInitialized() { if (!hasProtocol) return false; if (!hasMessage) return false; if (!hasTarget) return false; + if (!hasUuid) return false; if (!hasTimeout) return false; if (!hasIsActor) return false; if (!hasIsOneWay) return false; @@ -140,20 +148,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (hasTarget()) { output.writeString(6, getTarget()); } + if (hasUuid()) { + output.writeString(7, getUuid()); + } if (hasTimeout()) { - output.writeUInt64(7, getTimeout()); + output.writeUInt64(8, getTimeout()); } if (hasSupervisorUuid()) { - output.writeString(8, getSupervisorUuid()); + output.writeString(9, getSupervisorUuid()); } if (hasIsActor()) { - output.writeBool(9, getIsActor()); + output.writeBool(10, getIsActor()); } if (hasIsOneWay()) { - output.writeBool(10, getIsOneWay()); + output.writeBool(11, getIsOneWay()); } if (hasIsEscaped()) { - output.writeBool(11, getIsEscaped()); + output.writeBool(12, getIsEscaped()); } getUnknownFields().writeTo(output); } @@ -188,25 +199,29 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeStringSize(6, getTarget()); } + if (hasUuid()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(7, getUuid()); + } if (hasTimeout()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(7, getTimeout()); + .computeUInt64Size(8, getTimeout()); } if (hasSupervisorUuid()) { size += com.google.protobuf.CodedOutputStream - .computeStringSize(8, getSupervisorUuid()); + .computeStringSize(9, getSupervisorUuid()); } if (hasIsActor()) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, getIsActor()); + .computeBoolSize(10, getIsActor()); } if (hasIsOneWay()) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(10, getIsOneWay()); + .computeBoolSize(11, getIsOneWay()); } if (hasIsEscaped()) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, getIsEscaped()); + .computeBoolSize(12, getIsEscaped()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -375,6 +390,9 @@ public Builder mergeFrom(se.scalablesolutions.akka.nio.protobuf.RemoteProtocol.R if (other.hasTarget()) { setTarget(other.getTarget()); } + if (other.hasUuid()) { + setUuid(other.getUuid()); + } if (other.hasTimeout()) { setTimeout(other.getTimeout()); } @@ -439,23 +457,27 @@ public Builder mergeFrom( setTarget(input.readString()); break; } - case 56: { + case 58: { + setUuid(input.readString()); + break; + } + case 64: { setTimeout(input.readUInt64()); break; } - case 66: { + case 74: { setSupervisorUuid(input.readString()); break; } - case 72: { + case 80: { setIsActor(input.readBool()); break; } - case 80: { + case 88: { setIsOneWay(input.readBool()); break; } - case 88: { + case 96: { setIsEscaped(input.readBool()); break; } @@ -584,7 +606,28 @@ public Builder clearTarget() { return this; } - // required uint64 timeout = 7; + // required string uuid = 7; + public boolean hasUuid() { + return result.hasUuid(); + } + public java.lang.String getUuid() { + return result.getUuid(); + } + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasUuid = true; + result.uuid_ = value; + return this; + } + public Builder clearUuid() { + result.hasUuid = false; + result.uuid_ = getDefaultInstance().getUuid(); + return this; + } + + // required uint64 timeout = 8; public boolean hasTimeout() { return result.hasTimeout(); } @@ -602,7 +645,7 @@ public Builder clearTimeout() { return this; } - // optional string supervisorUuid = 8; + // optional string supervisorUuid = 9; public boolean hasSupervisorUuid() { return result.hasSupervisorUuid(); } @@ -623,7 +666,7 @@ public Builder clearSupervisorUuid() { return this; } - // required bool isActor = 9; + // required bool isActor = 10; public boolean hasIsActor() { return result.hasIsActor(); } @@ -641,7 +684,7 @@ public Builder clearIsActor() { return this; } - // required bool isOneWay = 10; + // required bool isOneWay = 11; public boolean hasIsOneWay() { return result.hasIsOneWay(); } @@ -659,7 +702,7 @@ public Builder clearIsOneWay() { return this; } - // required bool isEscaped = 11; + // required bool isEscaped = 12; public boolean hasIsEscaped() { return result.hasIsEscaped(); } @@ -1263,17 +1306,17 @@ public Builder clearIsSuccessful() { java.lang.String[] descriptorData = { "\n;se/scalablesolutions/akka/nio/protobuf" + "/RemoteProtocol.proto\022&se.scalablesoluti" + - "ons.akka.nio.protobuf\"\326\001\n\rRemoteRequest\022" + + "ons.akka.nio.protobuf\"\344\001\n\rRemoteRequest\022" + "\n\n\002id\030\001 \002(\004\022\020\n\010protocol\030\002 \002(\r\022\017\n\007message" + "\030\003 \002(\014\022\027\n\017messageManifest\030\004 \001(\014\022\016\n\006metho" + - "d\030\005 \001(\t\022\016\n\006target\030\006 \002(\t\022\017\n\007timeout\030\007 \002(\004" + - "\022\026\n\016supervisorUuid\030\010 \001(\t\022\017\n\007isActor\030\t \002(" + - "\010\022\020\n\010isOneWay\030\n \002(\010\022\021\n\tisEscaped\030\013 \002(\010\"\247" + - "\001\n\013RemoteReply\022\n\n\002id\030\001 \002(\004\022\020\n\010protocol\030\002" + - " \001(\r\022\017\n\007message\030\003 \001(\014\022\027\n\017messageManifest", - "\030\004 \001(\014\022\021\n\texception\030\005 \001(\t\022\026\n\016supervisorU" + - "uid\030\006 \001(\t\022\017\n\007isActor\030\007 \002(\010\022\024\n\014isSuccessf" + - "ul\030\010 \002(\010B\002H\001" + "d\030\005 \001(\t\022\016\n\006target\030\006 \002(\t\022\014\n\004uuid\030\007 \002(\t\022\017\n" + + "\007timeout\030\010 \002(\004\022\026\n\016supervisorUuid\030\t \001(\t\022\017" + + "\n\007isActor\030\n \002(\010\022\020\n\010isOneWay\030\013 \002(\010\022\021\n\tisE" + + "scaped\030\014 \002(\010\"\247\001\n\013RemoteReply\022\n\n\002id\030\001 \002(\004" + + "\022\020\n\010protocol\030\002 \001(\r\022\017\n\007message\030\003 \001(\014\022\027\n\017m", + "essageManifest\030\004 \001(\014\022\021\n\texception\030\005 \001(\t\022" + + "\026\n\016supervisorUuid\030\006 \001(\t\022\017\n\007isActor\030\007 \002(\010" + + "\022\024\n\014isSuccessful\030\010 \002(\010" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -1285,7 +1328,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_se_scalablesolutions_akka_nio_protobuf_RemoteRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_se_scalablesolutions_akka_nio_protobuf_RemoteRequest_descriptor, - new java.lang.String[] { "Id", "Protocol", "Message", "MessageManifest", "Method", "Target", "Timeout", "SupervisorUuid", "IsActor", "IsOneWay", "IsEscaped", }, + new java.lang.String[] { "Id", "Protocol", "Message", "MessageManifest", "Method", "Target", "Uuid", "Timeout", "SupervisorUuid", "IsActor", "IsOneWay", "IsEscaped", }, se.scalablesolutions.akka.nio.protobuf.RemoteProtocol.RemoteRequest.class, se.scalablesolutions.akka.nio.protobuf.RemoteProtocol.RemoteRequest.Builder.class); internal_static_se_scalablesolutions_akka_nio_protobuf_RemoteReply_descriptor = diff --git a/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.proto b/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.proto index 148b3960aea..1248339b3f5 100644 --- a/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.proto +++ b/akka-util-java/src/main/java/se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.proto @@ -1,7 +1,7 @@ /** * Copyright (C) 2009 Scalable Solutions. */ - + package se.scalablesolutions.akka.nio.protobuf; /* @@ -10,8 +10,6 @@ package se.scalablesolutions.akka.nio.protobuf; protoc se/scalablesolutions/akka/nio/protobuf/RemoteProtocol.proto --java_out . */ -option optimize_for = SPEED; - message RemoteRequest { required uint64 id = 1; required uint32 protocol = 2; @@ -19,11 +17,12 @@ message RemoteRequest { optional bytes messageManifest = 4; optional string method = 5; required string target = 6; - required uint64 timeout = 7; - optional string supervisorUuid = 8; - required bool isActor = 9; - required bool isOneWay = 10; - required bool isEscaped = 11; + required string uuid = 7; + required uint64 timeout = 8; + optional string supervisorUuid = 9; + required bool isActor = 10; + required bool isOneWay = 11; + required bool isEscaped = 12; } message RemoteReply {