diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java deleted file mode 100644 index 8a186ebf0f..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java +++ /dev/null @@ -1,1928 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto - -package se.scalablesolutions.akka.remote.protobuf; - -public final class RemoteProtocol { - private RemoteProtocol() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public static final class ActorRefProtocol extends - com.google.protobuf.GeneratedMessage { - // Use ActorRefProtocol.newBuilder() to construct. - private ActorRefProtocol() { - initFields(); - } - private ActorRefProtocol(boolean noInit) {} - - private static final ActorRefProtocol defaultInstance; - public static ActorRefProtocol getDefaultInstance() { - return defaultInstance; - } - - public ActorRefProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_fieldAccessorTable; - } - - // required string uuid = 1; - public static final int UUID_FIELD_NUMBER = 1; - private boolean hasUuid; - private java.lang.String uuid_ = ""; - public boolean hasUuid() { return hasUuid; } - public java.lang.String getUuid() { return uuid_; } - - // required string actorClassName = 2; - public static final int ACTORCLASSNAME_FIELD_NUMBER = 2; - private boolean hasActorClassName; - private java.lang.String actorClassName_ = ""; - public boolean hasActorClassName() { return hasActorClassName; } - public java.lang.String getActorClassName() { return actorClassName_; } - - // required string sourceHostname = 3; - public static final int SOURCEHOSTNAME_FIELD_NUMBER = 3; - private boolean hasSourceHostname; - private java.lang.String sourceHostname_ = ""; - public boolean hasSourceHostname() { return hasSourceHostname; } - public java.lang.String getSourceHostname() { return sourceHostname_; } - - // required uint32 sourcePort = 4; - public static final int SOURCEPORT_FIELD_NUMBER = 4; - private boolean hasSourcePort; - private int sourcePort_ = 0; - public boolean hasSourcePort() { return hasSourcePort; } - public int getSourcePort() { return sourcePort_; } - - // required uint64 timeout = 5; - public static final int TIMEOUT_FIELD_NUMBER = 5; - private boolean hasTimeout; - private long timeout_ = 0L; - public boolean hasTimeout() { return hasTimeout; } - public long getTimeout() { return timeout_; } - - private void initFields() { - } - public final boolean isInitialized() { - if (!hasUuid) return false; - if (!hasActorClassName) return false; - if (!hasSourceHostname) return false; - if (!hasSourcePort) return false; - if (!hasTimeout) return false; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (hasUuid()) { - output.writeString(1, getUuid()); - } - if (hasActorClassName()) { - output.writeString(2, getActorClassName()); - } - if (hasSourceHostname()) { - output.writeString(3, getSourceHostname()); - } - if (hasSourcePort()) { - output.writeUInt32(4, getSourcePort()); - } - if (hasTimeout()) { - output.writeUInt64(5, getTimeout()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (hasUuid()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(1, getUuid()); - } - if (hasActorClassName()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(2, getActorClassName()); - } - if (hasSourceHostname()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(3, getSourceHostname()); - } - if (hasSourcePort()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, getSourcePort()); - } - if (hasTimeout()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(5, getTimeout()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder { - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol result; - - // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.newBuilder() - private Builder() {} - - private static Builder create() { - Builder builder = new Builder(); - builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol(); - return builder; - } - - protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol internalGetResult() { - return result; - } - - public Builder clear() { - if (result == null) { - throw new IllegalStateException( - "Cannot call clear() after build()."); - } - result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol(); - return this; - } - - public Builder clone() { - return create().mergeFrom(result); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDescriptor(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol getDefaultInstanceForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); - } - - public boolean isInitialized() { - return result.isInitialized(); - } - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol build() { - if (result != null && !isInitialized()) { - throw newUninitializedMessageException(result); - } - return buildPartial(); - } - - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - if (!isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return buildPartial(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol buildPartial() { - if (result == null) { - throw new IllegalStateException( - "build() has already been called on this Builder."); - } - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol returnMe = result; - result = null; - return returnMe; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol) { - return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol other) { - if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance()) return this; - if (other.hasUuid()) { - setUuid(other.getUuid()); - } - if (other.hasActorClassName()) { - setActorClassName(other.getActorClassName()); - } - if (other.hasSourceHostname()) { - setSourceHostname(other.getSourceHostname()); - } - if (other.hasSourcePort()) { - setSourcePort(other.getSourcePort()); - } - if (other.hasTimeout()) { - setTimeout(other.getTimeout()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite 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: { - setUuid(input.readString()); - break; - } - case 18: { - setActorClassName(input.readString()); - break; - } - case 26: { - setSourceHostname(input.readString()); - break; - } - case 32: { - setSourcePort(input.readUInt32()); - break; - } - case 40: { - setTimeout(input.readUInt64()); - break; - } - } - } - } - - - // required string uuid = 1; - 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 string actorClassName = 2; - public boolean hasActorClassName() { - return result.hasActorClassName(); - } - public java.lang.String getActorClassName() { - return result.getActorClassName(); - } - public Builder setActorClassName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - result.hasActorClassName = true; - result.actorClassName_ = value; - return this; - } - public Builder clearActorClassName() { - result.hasActorClassName = false; - result.actorClassName_ = getDefaultInstance().getActorClassName(); - return this; - } - - // required string sourceHostname = 3; - public boolean hasSourceHostname() { - return result.hasSourceHostname(); - } - public java.lang.String getSourceHostname() { - return result.getSourceHostname(); - } - public Builder setSourceHostname(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - result.hasSourceHostname = true; - result.sourceHostname_ = value; - return this; - } - public Builder clearSourceHostname() { - result.hasSourceHostname = false; - result.sourceHostname_ = getDefaultInstance().getSourceHostname(); - return this; - } - - // required uint32 sourcePort = 4; - public boolean hasSourcePort() { - return result.hasSourcePort(); - } - public int getSourcePort() { - return result.getSourcePort(); - } - public Builder setSourcePort(int value) { - result.hasSourcePort = true; - result.sourcePort_ = value; - return this; - } - public Builder clearSourcePort() { - result.hasSourcePort = false; - result.sourcePort_ = 0; - return this; - } - - // required uint64 timeout = 5; - 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; - } - - // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol) - } - - static { - defaultInstance = new ActorRefProtocol(true); - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol) - } - - public static final class RemoteRequestProtocol extends - com.google.protobuf.GeneratedMessage { - // Use RemoteRequestProtocol.newBuilder() to construct. - private RemoteRequestProtocol() { - initFields(); - } - private RemoteRequestProtocol(boolean noInit) {} - - private static final RemoteRequestProtocol defaultInstance; - public static RemoteRequestProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteRequestProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_fieldAccessorTable; - } - - // required uint64 id = 1; - public static final int ID_FIELD_NUMBER = 1; - private boolean hasId; - private long id_ = 0L; - public boolean hasId() { return hasId; } - public long getId() { return id_; } - - // required uint32 protocol = 2; - public static final int PROTOCOL_FIELD_NUMBER = 2; - private boolean hasProtocol; - private int protocol_ = 0; - public boolean hasProtocol() { return hasProtocol; } - public int getProtocol() { return protocol_; } - - // 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_; } - - // optional bytes messageManifest = 4; - public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; - private boolean hasMessageManifest; - private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasMessageManifest() { return hasMessageManifest; } - public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } - - // optional string method = 5; - public static final int METHOD_FIELD_NUMBER = 5; - private boolean hasMethod; - private java.lang.String method_ = ""; - public boolean hasMethod() { return hasMethod; } - public java.lang.String getMethod() { return method_; } - - // required string target = 6; - public static final int TARGET_FIELD_NUMBER = 6; - private boolean hasTarget; - private java.lang.String target_ = ""; - public boolean hasTarget() { return hasTarget; } - public java.lang.String getTarget() { return target_; } - - // 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 = 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 = 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 = 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 = 12; - public static final int ISESCAPED_FIELD_NUMBER = 12; - private boolean hasIsEscaped; - private boolean isEscaped_ = false; - public boolean hasIsEscaped() { return hasIsEscaped; } - public boolean getIsEscaped() { return isEscaped_; } - - // optional .se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol sender = 13; - public static final int SENDER_FIELD_NUMBER = 13; - private boolean hasSender; - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol sender_; - public boolean hasSender() { return hasSender; } - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol getSender() { return sender_; } - - private void initFields() { - sender_ = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); - } - public final boolean isInitialized() { - if (!hasId) return false; - 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; - if (!hasIsEscaped) return false; - if (hasSender()) { - if (!getSender().isInitialized()) return false; - } - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (hasId()) { - output.writeUInt64(1, getId()); - } - if (hasProtocol()) { - output.writeUInt32(2, getProtocol()); - } - if (hasMessage()) { - output.writeBytes(3, getMessage()); - } - if (hasMessageManifest()) { - output.writeBytes(4, getMessageManifest()); - } - if (hasMethod()) { - output.writeString(5, getMethod()); - } - if (hasTarget()) { - output.writeString(6, getTarget()); - } - if (hasUuid()) { - output.writeString(7, getUuid()); - } - if (hasTimeout()) { - output.writeUInt64(8, getTimeout()); - } - if (hasSupervisorUuid()) { - output.writeString(9, getSupervisorUuid()); - } - if (hasIsActor()) { - output.writeBool(10, getIsActor()); - } - if (hasIsOneWay()) { - output.writeBool(11, getIsOneWay()); - } - if (hasIsEscaped()) { - output.writeBool(12, getIsEscaped()); - } - if (hasSender()) { - output.writeMessage(13, getSender()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (hasId()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, getId()); - } - if (hasProtocol()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, getProtocol()); - } - if (hasMessage()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getMessage()); - } - if (hasMessageManifest()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getMessageManifest()); - } - if (hasMethod()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(5, getMethod()); - } - if (hasTarget()) { - 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(8, getTimeout()); - } - if (hasSupervisorUuid()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(9, getSupervisorUuid()); - } - if (hasIsActor()) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(10, getIsActor()); - } - if (hasIsOneWay()) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, getIsOneWay()); - } - if (hasIsEscaped()) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(12, getIsEscaped()); - } - if (hasSender()) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getSender()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder { - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol result; - - // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.newBuilder() - private Builder() {} - - private static Builder create() { - Builder builder = new Builder(); - builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol(); - return builder; - } - - protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol internalGetResult() { - return result; - } - - public Builder clear() { - if (result == null) { - throw new IllegalStateException( - "Cannot call clear() after build()."); - } - result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol(); - return this; - } - - public Builder clone() { - return create().mergeFrom(result); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDescriptor(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol getDefaultInstanceForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance(); - } - - public boolean isInitialized() { - return result.isInitialized(); - } - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol build() { - if (result != null && !isInitialized()) { - throw newUninitializedMessageException(result); - } - return buildPartial(); - } - - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - if (!isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return buildPartial(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol buildPartial() { - if (result == null) { - throw new IllegalStateException( - "build() has already been called on this Builder."); - } - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol returnMe = result; - result = null; - return returnMe; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol) { - return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol other) { - if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (other.hasProtocol()) { - setProtocol(other.getProtocol()); - } - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - if (other.hasMessageManifest()) { - setMessageManifest(other.getMessageManifest()); - } - if (other.hasMethod()) { - setMethod(other.getMethod()); - } - if (other.hasTarget()) { - setTarget(other.getTarget()); - } - if (other.hasUuid()) { - setUuid(other.getUuid()); - } - 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.hasSender()) { - mergeSender(other.getSender()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite 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: { - setId(input.readUInt64()); - break; - } - case 16: { - setProtocol(input.readUInt32()); - break; - } - case 26: { - setMessage(input.readBytes()); - break; - } - case 34: { - setMessageManifest(input.readBytes()); - break; - } - case 42: { - setMethod(input.readString()); - break; - } - case 50: { - setTarget(input.readString()); - break; - } - case 58: { - setUuid(input.readString()); - break; - } - case 64: { - setTimeout(input.readUInt64()); - break; - } - case 74: { - setSupervisorUuid(input.readString()); - break; - } - case 80: { - setIsActor(input.readBool()); - break; - } - case 88: { - setIsOneWay(input.readBool()); - break; - } - case 96: { - setIsEscaped(input.readBool()); - break; - } - case 106: { - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.newBuilder(); - if (hasSender()) { - subBuilder.mergeFrom(getSender()); - } - input.readMessage(subBuilder, extensionRegistry); - setSender(subBuilder.buildPartial()); - break; - } - } - } - } - - - // required uint64 id = 1; - 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 uint32 protocol = 2; - public boolean hasProtocol() { - return result.hasProtocol(); - } - public int getProtocol() { - return result.getProtocol(); - } - public Builder setProtocol(int value) { - result.hasProtocol = true; - result.protocol_ = value; - return this; - } - public Builder clearProtocol() { - result.hasProtocol = false; - result.protocol_ = 0; - 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_ = getDefaultInstance().getMessage(); - return this; - } - - // optional bytes messageManifest = 4; - public boolean hasMessageManifest() { - return result.hasMessageManifest(); - } - public com.google.protobuf.ByteString getMessageManifest() { - return result.getMessageManifest(); - } - public Builder setMessageManifest(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - result.hasMessageManifest = true; - result.messageManifest_ = value; - return this; - } - public Builder clearMessageManifest() { - result.hasMessageManifest = false; - result.messageManifest_ = getDefaultInstance().getMessageManifest(); - return this; - } - - // optional string method = 5; - 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_ = getDefaultInstance().getMethod(); - return this; - } - - // required string target = 6; - 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_ = getDefaultInstance().getTarget(); - return this; - } - - // 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(); - } - 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; - } - - // optional string supervisorUuid = 9; - 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_ = getDefaultInstance().getSupervisorUuid(); - return this; - } - - // required bool isActor = 10; - 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 = 11; - 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 = 12; - 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; - } - - // optional .se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol sender = 13; - public boolean hasSender() { - return result.hasSender(); - } - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol getSender() { - return result.getSender(); - } - public Builder setSender(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol value) { - if (value == null) { - throw new NullPointerException(); - } - result.hasSender = true; - result.sender_ = value; - return this; - } - public Builder setSender(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.Builder builderForValue) { - result.hasSender = true; - result.sender_ = builderForValue.build(); - return this; - } - public Builder mergeSender(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol value) { - if (result.hasSender() && - result.sender_ != se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance()) { - result.sender_ = - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.newBuilder(result.sender_).mergeFrom(value).buildPartial(); - } else { - result.sender_ = value; - } - result.hasSender = true; - return this; - } - public Builder clearSender() { - result.hasSender = false; - result.sender_ = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); - return this; - } - - // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.RemoteRequestProtocol) - } - - static { - defaultInstance = new RemoteRequestProtocol(true); - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.RemoteRequestProtocol) - } - - public static final class RemoteReplyProtocol extends - com.google.protobuf.GeneratedMessage { - // Use RemoteReplyProtocol.newBuilder() to construct. - private RemoteReplyProtocol() { - initFields(); - } - private RemoteReplyProtocol(boolean noInit) {} - - private static final RemoteReplyProtocol defaultInstance; - public static RemoteReplyProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteReplyProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_fieldAccessorTable; - } - - // required uint64 id = 1; - public static final int ID_FIELD_NUMBER = 1; - private boolean hasId; - private long id_ = 0L; - public boolean hasId() { return hasId; } - public long getId() { return id_; } - - // optional uint32 protocol = 2; - public static final int PROTOCOL_FIELD_NUMBER = 2; - private boolean hasProtocol; - private int protocol_ = 0; - public boolean hasProtocol() { return hasProtocol; } - public int getProtocol() { return protocol_; } - - // optional 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_; } - - // optional bytes messageManifest = 4; - public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; - private boolean hasMessageManifest; - private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasMessageManifest() { return hasMessageManifest; } - public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } - - // optional string exception = 5; - public static final int EXCEPTION_FIELD_NUMBER = 5; - private boolean hasException; - private java.lang.String exception_ = ""; - public boolean hasException() { return hasException; } - public java.lang.String getException() { return exception_; } - - // optional string supervisorUuid = 6; - public static final int SUPERVISORUUID_FIELD_NUMBER = 6; - private boolean hasSupervisorUuid; - private java.lang.String supervisorUuid_ = ""; - public boolean hasSupervisorUuid() { return hasSupervisorUuid; } - public java.lang.String getSupervisorUuid() { return supervisorUuid_; } - - // required bool isActor = 7; - public static final int ISACTOR_FIELD_NUMBER = 7; - private boolean hasIsActor; - private boolean isActor_ = false; - public boolean hasIsActor() { return hasIsActor; } - public boolean getIsActor() { return isActor_; } - - // required bool isSuccessful = 8; - public static final int ISSUCCESSFUL_FIELD_NUMBER = 8; - private boolean hasIsSuccessful; - private boolean isSuccessful_ = false; - public boolean hasIsSuccessful() { return hasIsSuccessful; } - public boolean getIsSuccessful() { return isSuccessful_; } - - private void initFields() { - } - public final boolean isInitialized() { - if (!hasId) return false; - if (!hasIsActor) return false; - if (!hasIsSuccessful) return false; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (hasId()) { - output.writeUInt64(1, getId()); - } - if (hasProtocol()) { - output.writeUInt32(2, getProtocol()); - } - if (hasMessage()) { - output.writeBytes(3, getMessage()); - } - if (hasMessageManifest()) { - output.writeBytes(4, getMessageManifest()); - } - if (hasException()) { - output.writeString(5, getException()); - } - if (hasSupervisorUuid()) { - output.writeString(6, getSupervisorUuid()); - } - if (hasIsActor()) { - output.writeBool(7, getIsActor()); - } - if (hasIsSuccessful()) { - output.writeBool(8, getIsSuccessful()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (hasId()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, getId()); - } - if (hasProtocol()) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, getProtocol()); - } - if (hasMessage()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getMessage()); - } - if (hasMessageManifest()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getMessageManifest()); - } - if (hasException()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(5, getException()); - } - if (hasSupervisorUuid()) { - size += com.google.protobuf.CodedOutputStream - .computeStringSize(6, getSupervisorUuid()); - } - if (hasIsActor()) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, getIsActor()); - } - if (hasIsSuccessful()) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, getIsSuccessful()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder { - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol result; - - // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.newBuilder() - private Builder() {} - - private static Builder create() { - Builder builder = new Builder(); - builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol(); - return builder; - } - - protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol internalGetResult() { - return result; - } - - public Builder clear() { - if (result == null) { - throw new IllegalStateException( - "Cannot call clear() after build()."); - } - result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol(); - return this; - } - - public Builder clone() { - return create().mergeFrom(result); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDescriptor(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol getDefaultInstanceForType() { - return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance(); - } - - public boolean isInitialized() { - return result.isInitialized(); - } - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol build() { - if (result != null && !isInitialized()) { - throw newUninitializedMessageException(result); - } - return buildPartial(); - } - - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - if (!isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return buildPartial(); - } - - public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol buildPartial() { - if (result == null) { - throw new IllegalStateException( - "build() has already been called on this Builder."); - } - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol returnMe = result; - result = null; - return returnMe; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol) { - return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol other) { - if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (other.hasProtocol()) { - setProtocol(other.getProtocol()); - } - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - if (other.hasMessageManifest()) { - setMessageManifest(other.getMessageManifest()); - } - if (other.hasException()) { - setException(other.getException()); - } - if (other.hasSupervisorUuid()) { - setSupervisorUuid(other.getSupervisorUuid()); - } - if (other.hasIsActor()) { - setIsActor(other.getIsActor()); - } - if (other.hasIsSuccessful()) { - setIsSuccessful(other.getIsSuccessful()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite 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: { - setId(input.readUInt64()); - break; - } - case 16: { - setProtocol(input.readUInt32()); - break; - } - case 26: { - setMessage(input.readBytes()); - break; - } - case 34: { - setMessageManifest(input.readBytes()); - break; - } - case 42: { - setException(input.readString()); - break; - } - case 50: { - setSupervisorUuid(input.readString()); - break; - } - case 56: { - setIsActor(input.readBool()); - break; - } - case 64: { - setIsSuccessful(input.readBool()); - break; - } - } - } - } - - - // required uint64 id = 1; - 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; - } - - // optional uint32 protocol = 2; - public boolean hasProtocol() { - return result.hasProtocol(); - } - public int getProtocol() { - return result.getProtocol(); - } - public Builder setProtocol(int value) { - result.hasProtocol = true; - result.protocol_ = value; - return this; - } - public Builder clearProtocol() { - result.hasProtocol = false; - result.protocol_ = 0; - return this; - } - - // optional 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_ = getDefaultInstance().getMessage(); - return this; - } - - // optional bytes messageManifest = 4; - public boolean hasMessageManifest() { - return result.hasMessageManifest(); - } - public com.google.protobuf.ByteString getMessageManifest() { - return result.getMessageManifest(); - } - public Builder setMessageManifest(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - result.hasMessageManifest = true; - result.messageManifest_ = value; - return this; - } - public Builder clearMessageManifest() { - result.hasMessageManifest = false; - result.messageManifest_ = getDefaultInstance().getMessageManifest(); - return this; - } - - // optional string exception = 5; - 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_ = getDefaultInstance().getException(); - return this; - } - - // optional string supervisorUuid = 6; - 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_ = getDefaultInstance().getSupervisorUuid(); - return this; - } - - // required bool isActor = 7; - 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 isSuccessful = 8; - 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; - } - - // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.RemoteReplyProtocol) - } - - static { - defaultInstance = new RemoteReplyProtocol(true); - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.RemoteReplyProtocol) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n>se/scalablesolutions/akka/remote/proto" + - "buf/RemoteProtocol.proto\022)se.scalablesol" + - "utions.akka.remote.protobuf\"u\n\020ActorRefP" + - "rotocol\022\014\n\004uuid\030\001 \002(\t\022\026\n\016actorClassName\030" + - "\002 \002(\t\022\026\n\016sourceHostname\030\003 \002(\t\022\022\n\nsourceP" + - "ort\030\004 \002(\r\022\017\n\007timeout\030\005 \002(\004\"\271\002\n\025RemoteReq" + - "uestProtocol\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\006method\030\005 \001(\t\022\016\n\006target\030\006 \002(\t\022\014\n\004" + - "uuid\030\007 \002(\t\022\017\n\007timeout\030\010 \002(\004\022\026\n\016superviso", - "rUuid\030\t \001(\t\022\017\n\007isActor\030\n \002(\010\022\020\n\010isOneWay" + - "\030\013 \002(\010\022\021\n\tisEscaped\030\014 \002(\010\022K\n\006sender\030\r \001(" + - "\0132;.se.scalablesolutions.akka.remote.pro" + - "tobuf.ActorRefProtocol\"\257\001\n\023RemoteReplyPr" + - "otocol\022\n\n\002id\030\001 \002(\004\022\020\n\010protocol\030\002 \001(\r\022\017\n\007" + - "message\030\003 \001(\014\022\027\n\017messageManifest\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() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor, - new java.lang.String[] { "Uuid", "ActorClassName", "SourceHostname", "SourcePort", "Timeout", }, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.class, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.Builder.class); - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_descriptor, - new java.lang.String[] { "Id", "Protocol", "Message", "MessageManifest", "Method", "Target", "Uuid", "Timeout", "SupervisorUuid", "IsActor", "IsOneWay", "IsEscaped", "Sender", }, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.class, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.Builder.class); - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_descriptor, - new java.lang.String[] { "Id", "Protocol", "Message", "MessageManifest", "Exception", "SupervisorUuid", "IsActor", "IsSuccessful", }, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.class, - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.Builder.class); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - public static void internalForceInit() {} - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto deleted file mode 100644 index 537786f353..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.remote.protobuf; - -/* - Compile with: - cd ./akka-core/src/main/java - protoc se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto --java_out . -*/ - -message ActorRefProtocol { - required string uuid = 1; - required string actorClassName = 2; - required string sourceHostname = 3; - required uint32 sourcePort = 4; - required uint64 timeout = 5; -} - -message RemoteRequestProtocol { - required uint64 id = 1; - required uint32 protocol = 2; - required bytes message = 3; - optional bytes messageManifest = 4; - optional string method = 5; - required string target = 6; - required string uuid = 7; - required uint64 timeout = 8; - optional string supervisorUuid = 9; - required bool isActor = 10; - required bool isOneWay = 11; - required bool isEscaped = 12; - optional ActorRefProtocol sender = 13; -} - -message RemoteReplyProtocol { - required uint64 id = 1; - optional uint32 protocol = 2; - optional bytes message = 3; - optional bytes messageManifest = 4; - optional string exception = 5; - optional string supervisorUuid = 6; - required bool isActor = 7; - required bool isSuccessful = 8; -} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protocol/RemoteProtocol.java b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protocol/RemoteProtocol.java new file mode 100644 index 0000000000..31234fe4a8 --- /dev/null +++ b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protocol/RemoteProtocol.java @@ -0,0 +1,3983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: RemoteProtocol.proto + +package se.scalablesolutions.akka.remote.protocol; + +public final class RemoteProtocol { + private RemoteProtocol() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public enum SerializationSchemeType + implements com.google.protobuf.ProtocolMessageEnum { + JAVA(0, 1), + SBINARY(1, 2), + SCALA_JSON(2, 3), + JAVA_JSON(3, 4), + PROTOBUF(4, 5), + ; + + + public final int getNumber() { return value; } + + public static SerializationSchemeType valueOf(int value) { + switch (value) { + case 1: return JAVA; + case 2: return SBINARY; + case 3: return SCALA_JSON; + case 4: return JAVA_JSON; + case 5: return PROTOBUF; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SerializationSchemeType findValueByNumber(int number) { + return SerializationSchemeType.valueOf(number) + ; } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.getDescriptor().getEnumTypes().get(0); + } + + private static final SerializationSchemeType[] VALUES = { + JAVA, SBINARY, SCALA_JSON, JAVA_JSON, PROTOBUF, + }; + public static SerializationSchemeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + private final int index; + private final int value; + private SerializationSchemeType(int index, int value) { + this.index = index; + this.value = value; + } + + static { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.getDescriptor(); + } + + // @@protoc_insertion_point(enum_scope:SerializationSchemeType) + } + + public enum LifeCycleType + implements com.google.protobuf.ProtocolMessageEnum { + PERMANENT(0, 1), + TEMPORARY(1, 2), + ; + + + public final int getNumber() { return value; } + + public static LifeCycleType valueOf(int value) { + switch (value) { + case 1: return PERMANENT; + case 2: return TEMPORARY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LifeCycleType findValueByNumber(int number) { + return LifeCycleType.valueOf(number) + ; } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.getDescriptor().getEnumTypes().get(1); + } + + private static final LifeCycleType[] VALUES = { + PERMANENT, TEMPORARY, + }; + public static LifeCycleType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + private final int index; + private final int value; + private LifeCycleType(int index, int value) { + this.index = index; + this.value = value; + } + + static { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.getDescriptor(); + } + + // @@protoc_insertion_point(enum_scope:LifeCycleType) + } + + public static final class LifeCycleProtocol extends + com.google.protobuf.GeneratedMessage { + // Use LifeCycleProtocol.newBuilder() to construct. + private LifeCycleProtocol() { + initFields(); + } + private LifeCycleProtocol(boolean noInit) {} + + private static final LifeCycleProtocol defaultInstance; + public static LifeCycleProtocol getDefaultInstance() { + return defaultInstance; + } + + public LifeCycleProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_LifeCycleProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_LifeCycleProtocol_fieldAccessorTable; + } + + // required .LifeCycleType lifeCycle = 1; + public static final int LIFECYCLE_FIELD_NUMBER = 1; + private boolean hasLifeCycle; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType lifeCycle_; + public boolean hasLifeCycle() { return hasLifeCycle; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType getLifeCycle() { return lifeCycle_; } + + // optional string preRestart = 2; + public static final int PRERESTART_FIELD_NUMBER = 2; + private boolean hasPreRestart; + private java.lang.String preRestart_ = ""; + public boolean hasPreRestart() { return hasPreRestart; } + public java.lang.String getPreRestart() { return preRestart_; } + + // optional string postRestart = 3; + public static final int POSTRESTART_FIELD_NUMBER = 3; + private boolean hasPostRestart; + private java.lang.String postRestart_ = ""; + public boolean hasPostRestart() { return hasPostRestart; } + public java.lang.String getPostRestart() { return postRestart_; } + + private void initFields() { + lifeCycle_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType.PERMANENT; + } + public final boolean isInitialized() { + if (!hasLifeCycle) return false; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasLifeCycle()) { + output.writeEnum(1, getLifeCycle().getNumber()); + } + if (hasPreRestart()) { + output.writeString(2, getPreRestart()); + } + if (hasPostRestart()) { + output.writeString(3, getPostRestart()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasLifeCycle()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, getLifeCycle().getNumber()); + } + if (hasPreRestart()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(2, getPreRestart()); + } + if (hasPostRestart()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(3, getPostRestart()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDefaultInstance()) return this; + if (other.hasLifeCycle()) { + setLifeCycle(other.getLifeCycle()); + } + if (other.hasPreRestart()) { + setPreRestart(other.getPreRestart()); + } + if (other.hasPostRestart()) { + setPostRestart(other.getPostRestart()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + int rawValue = input.readEnum(); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType value = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + setLifeCycle(value); + } + break; + } + case 18: { + setPreRestart(input.readString()); + break; + } + case 26: { + setPostRestart(input.readString()); + break; + } + } + } + } + + + // required .LifeCycleType lifeCycle = 1; + public boolean hasLifeCycle() { + return result.hasLifeCycle(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType getLifeCycle() { + return result.getLifeCycle(); + } + public Builder setLifeCycle(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasLifeCycle = true; + result.lifeCycle_ = value; + return this; + } + public Builder clearLifeCycle() { + result.hasLifeCycle = false; + result.lifeCycle_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleType.PERMANENT; + return this; + } + + // optional string preRestart = 2; + public boolean hasPreRestart() { + return result.hasPreRestart(); + } + public java.lang.String getPreRestart() { + return result.getPreRestart(); + } + public Builder setPreRestart(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasPreRestart = true; + result.preRestart_ = value; + return this; + } + public Builder clearPreRestart() { + result.hasPreRestart = false; + result.preRestart_ = getDefaultInstance().getPreRestart(); + return this; + } + + // optional string postRestart = 3; + public boolean hasPostRestart() { + return result.hasPostRestart(); + } + public java.lang.String getPostRestart() { + return result.getPostRestart(); + } + public Builder setPostRestart(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasPostRestart = true; + result.postRestart_ = value; + return this; + } + public Builder clearPostRestart() { + result.hasPostRestart = false; + result.postRestart_ = getDefaultInstance().getPostRestart(); + return this; + } + + // @@protoc_insertion_point(builder_scope:LifeCycleProtocol) + } + + static { + defaultInstance = new LifeCycleProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:LifeCycleProtocol) + } + + public static final class AddressProtocol extends + com.google.protobuf.GeneratedMessage { + // Use AddressProtocol.newBuilder() to construct. + private AddressProtocol() { + initFields(); + } + private AddressProtocol(boolean noInit) {} + + private static final AddressProtocol defaultInstance; + public static AddressProtocol getDefaultInstance() { + return defaultInstance; + } + + public AddressProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_AddressProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_AddressProtocol_fieldAccessorTable; + } + + // required string hostname = 1; + public static final int HOSTNAME_FIELD_NUMBER = 1; + private boolean hasHostname; + private java.lang.String hostname_ = ""; + public boolean hasHostname() { return hasHostname; } + public java.lang.String getHostname() { return hostname_; } + + // required uint32 port = 2; + public static final int PORT_FIELD_NUMBER = 2; + private boolean hasPort; + private int port_ = 0; + public boolean hasPort() { return hasPort; } + public int getPort() { return port_; } + + private void initFields() { + } + public final boolean isInitialized() { + if (!hasHostname) return false; + if (!hasPort) return false; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasHostname()) { + output.writeString(1, getHostname()); + } + if (hasPort()) { + output.writeUInt32(2, getPort()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasHostname()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(1, getHostname()); + } + if (hasPort()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, getPort()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance()) return this; + if (other.hasHostname()) { + setHostname(other.getHostname()); + } + if (other.hasPort()) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setHostname(input.readString()); + break; + } + case 16: { + setPort(input.readUInt32()); + break; + } + } + } + } + + + // required string hostname = 1; + public boolean hasHostname() { + return result.hasHostname(); + } + public java.lang.String getHostname() { + return result.getHostname(); + } + public Builder setHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasHostname = true; + result.hostname_ = value; + return this; + } + public Builder clearHostname() { + result.hasHostname = false; + result.hostname_ = getDefaultInstance().getHostname(); + return this; + } + + // required uint32 port = 2; + public boolean hasPort() { + return result.hasPort(); + } + public int getPort() { + return result.getPort(); + } + public Builder setPort(int value) { + result.hasPort = true; + result.port_ = value; + return this; + } + public Builder clearPort() { + result.hasPort = false; + result.port_ = 0; + return this; + } + + // @@protoc_insertion_point(builder_scope:AddressProtocol) + } + + static { + defaultInstance = new AddressProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:AddressProtocol) + } + + public static final class ExceptionProtocol extends + com.google.protobuf.GeneratedMessage { + // Use ExceptionProtocol.newBuilder() to construct. + private ExceptionProtocol() { + initFields(); + } + private ExceptionProtocol(boolean noInit) {} + + private static final ExceptionProtocol defaultInstance; + public static ExceptionProtocol getDefaultInstance() { + return defaultInstance; + } + + public ExceptionProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_ExceptionProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_ExceptionProtocol_fieldAccessorTable; + } + + // required string classname = 1; + public static final int CLASSNAME_FIELD_NUMBER = 1; + private boolean hasClassname; + private java.lang.String classname_ = ""; + public boolean hasClassname() { return hasClassname; } + public java.lang.String getClassname() { return classname_; } + + // required string message = 2; + public static final int MESSAGE_FIELD_NUMBER = 2; + private boolean hasMessage; + private java.lang.String message_ = ""; + public boolean hasMessage() { return hasMessage; } + public java.lang.String getMessage() { return message_; } + + private void initFields() { + } + public final boolean isInitialized() { + if (!hasClassname) return false; + if (!hasMessage) return false; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasClassname()) { + output.writeString(1, getClassname()); + } + if (hasMessage()) { + output.writeString(2, getMessage()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasClassname()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(1, getClassname()); + } + if (hasMessage()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(2, getMessage()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDefaultInstance()) return this; + if (other.hasClassname()) { + setClassname(other.getClassname()); + } + if (other.hasMessage()) { + setMessage(other.getMessage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setClassname(input.readString()); + break; + } + case 18: { + setMessage(input.readString()); + break; + } + } + } + } + + + // required string classname = 1; + public boolean hasClassname() { + return result.hasClassname(); + } + public java.lang.String getClassname() { + return result.getClassname(); + } + public Builder setClassname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasClassname = true; + result.classname_ = value; + return this; + } + public Builder clearClassname() { + result.hasClassname = false; + result.classname_ = getDefaultInstance().getClassname(); + return this; + } + + // required string message = 2; + public boolean hasMessage() { + return result.hasMessage(); + } + public java.lang.String getMessage() { + return result.getMessage(); + } + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasMessage = true; + result.message_ = value; + return this; + } + public Builder clearMessage() { + result.hasMessage = false; + result.message_ = getDefaultInstance().getMessage(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ExceptionProtocol) + } + + static { + defaultInstance = new ExceptionProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:ExceptionProtocol) + } + + public static final class RemoteActorRefProtocol extends + com.google.protobuf.GeneratedMessage { + // Use RemoteActorRefProtocol.newBuilder() to construct. + private RemoteActorRefProtocol() { + initFields(); + } + private RemoteActorRefProtocol(boolean noInit) {} + + private static final RemoteActorRefProtocol defaultInstance; + public static RemoteActorRefProtocol getDefaultInstance() { + return defaultInstance; + } + + public RemoteActorRefProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteActorRefProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteActorRefProtocol_fieldAccessorTable; + } + + // required string uuid = 1; + public static final int UUID_FIELD_NUMBER = 1; + private boolean hasUuid; + private java.lang.String uuid_ = ""; + public boolean hasUuid() { return hasUuid; } + public java.lang.String getUuid() { return uuid_; } + + // required string actorClassname = 2; + public static final int ACTORCLASSNAME_FIELD_NUMBER = 2; + private boolean hasActorClassname; + private java.lang.String actorClassname_ = ""; + public boolean hasActorClassname() { return hasActorClassname; } + public java.lang.String getActorClassname() { return actorClassname_; } + + // required .AddressProtocol homeAddress = 3; + public static final int HOMEADDRESS_FIELD_NUMBER = 3; + private boolean hasHomeAddress; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol homeAddress_; + public boolean hasHomeAddress() { return hasHomeAddress; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol getHomeAddress() { return homeAddress_; } + + // optional 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_; } + + private void initFields() { + homeAddress_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance(); + } + public final boolean isInitialized() { + if (!hasUuid) return false; + if (!hasActorClassname) return false; + if (!hasHomeAddress) return false; + if (!getHomeAddress().isInitialized()) return false; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasUuid()) { + output.writeString(1, getUuid()); + } + if (hasActorClassname()) { + output.writeString(2, getActorClassname()); + } + if (hasHomeAddress()) { + output.writeMessage(3, getHomeAddress()); + } + if (hasTimeout()) { + output.writeUInt64(4, getTimeout()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasUuid()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(1, getUuid()); + } + if (hasActorClassname()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(2, getActorClassname()); + } + if (hasHomeAddress()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getHomeAddress()); + } + if (hasTimeout()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, getTimeout()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) return this; + if (other.hasUuid()) { + setUuid(other.getUuid()); + } + if (other.hasActorClassname()) { + setActorClassname(other.getActorClassname()); + } + if (other.hasHomeAddress()) { + mergeHomeAddress(other.getHomeAddress()); + } + if (other.hasTimeout()) { + setTimeout(other.getTimeout()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setUuid(input.readString()); + break; + } + case 18: { + setActorClassname(input.readString()); + break; + } + case 26: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.newBuilder(); + if (hasHomeAddress()) { + subBuilder.mergeFrom(getHomeAddress()); + } + input.readMessage(subBuilder, extensionRegistry); + setHomeAddress(subBuilder.buildPartial()); + break; + } + case 32: { + setTimeout(input.readUInt64()); + break; + } + } + } + } + + + // required string uuid = 1; + 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 string actorClassname = 2; + public boolean hasActorClassname() { + return result.hasActorClassname(); + } + public java.lang.String getActorClassname() { + return result.getActorClassname(); + } + public Builder setActorClassname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasActorClassname = true; + result.actorClassname_ = value; + return this; + } + public Builder clearActorClassname() { + result.hasActorClassname = false; + result.actorClassname_ = getDefaultInstance().getActorClassname(); + return this; + } + + // required .AddressProtocol homeAddress = 3; + public boolean hasHomeAddress() { + return result.hasHomeAddress(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol getHomeAddress() { + return result.getHomeAddress(); + } + public Builder setHomeAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasHomeAddress = true; + result.homeAddress_ = value; + return this; + } + public Builder setHomeAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder builderForValue) { + result.hasHomeAddress = true; + result.homeAddress_ = builderForValue.build(); + return this; + } + public Builder mergeHomeAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol value) { + if (result.hasHomeAddress() && + result.homeAddress_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance()) { + result.homeAddress_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.newBuilder(result.homeAddress_).mergeFrom(value).buildPartial(); + } else { + result.homeAddress_ = value; + } + result.hasHomeAddress = true; + return this; + } + public Builder clearHomeAddress() { + result.hasHomeAddress = false; + result.homeAddress_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance(); + return this; + } + + // optional 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; + } + + // @@protoc_insertion_point(builder_scope:RemoteActorRefProtocol) + } + + static { + defaultInstance = new RemoteActorRefProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RemoteActorRefProtocol) + } + + public static final class SerializedActorRefProtocol extends + com.google.protobuf.GeneratedMessage { + // Use SerializedActorRefProtocol.newBuilder() to construct. + private SerializedActorRefProtocol() { + initFields(); + } + private SerializedActorRefProtocol(boolean noInit) {} + + private static final SerializedActorRefProtocol defaultInstance; + public static SerializedActorRefProtocol getDefaultInstance() { + return defaultInstance; + } + + public SerializedActorRefProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_SerializedActorRefProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_SerializedActorRefProtocol_fieldAccessorTable; + } + + // required string uuid = 1; + public static final int UUID_FIELD_NUMBER = 1; + private boolean hasUuid; + private java.lang.String uuid_ = ""; + public boolean hasUuid() { return hasUuid; } + public java.lang.String getUuid() { return uuid_; } + + // required string id = 2; + public static final int ID_FIELD_NUMBER = 2; + private boolean hasId; + private java.lang.String id_ = ""; + public boolean hasId() { return hasId; } + public java.lang.String getId() { return id_; } + + // required string actorClassname = 3; + public static final int ACTORCLASSNAME_FIELD_NUMBER = 3; + private boolean hasActorClassname; + private java.lang.String actorClassname_ = ""; + public boolean hasActorClassname() { return hasActorClassname; } + public java.lang.String getActorClassname() { return actorClassname_; } + + // required bytes actorInstance = 4; + public static final int ACTORINSTANCE_FIELD_NUMBER = 4; + private boolean hasActorInstance; + private com.google.protobuf.ByteString actorInstance_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasActorInstance() { return hasActorInstance; } + public com.google.protobuf.ByteString getActorInstance() { return actorInstance_; } + + // required string serializerClassname = 5; + public static final int SERIALIZERCLASSNAME_FIELD_NUMBER = 5; + private boolean hasSerializerClassname; + private java.lang.String serializerClassname_ = ""; + public boolean hasSerializerClassname() { return hasSerializerClassname; } + public java.lang.String getSerializerClassname() { return serializerClassname_; } + + // required .AddressProtocol originalAddress = 6; + public static final int ORIGINALADDRESS_FIELD_NUMBER = 6; + private boolean hasOriginalAddress; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol originalAddress_; + public boolean hasOriginalAddress() { return hasOriginalAddress; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol getOriginalAddress() { return originalAddress_; } + + // optional bool isTransactor = 7; + public static final int ISTRANSACTOR_FIELD_NUMBER = 7; + private boolean hasIsTransactor; + private boolean isTransactor_ = false; + public boolean hasIsTransactor() { return hasIsTransactor; } + public boolean getIsTransactor() { return isTransactor_; } + + // optional 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 .LifeCycleProtocol lifeCycle = 9; + public static final int LIFECYCLE_FIELD_NUMBER = 9; + private boolean hasLifeCycle; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol lifeCycle_; + public boolean hasLifeCycle() { return hasLifeCycle; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol getLifeCycle() { return lifeCycle_; } + + // optional .RemoteActorRefProtocol supervisor = 10; + public static final int SUPERVISOR_FIELD_NUMBER = 10; + private boolean hasSupervisor; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol supervisor_; + public boolean hasSupervisor() { return hasSupervisor; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getSupervisor() { return supervisor_; } + + // optional bytes hotswapStack = 11; + public static final int HOTSWAPSTACK_FIELD_NUMBER = 11; + private boolean hasHotswapStack; + private com.google.protobuf.ByteString hotswapStack_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasHotswapStack() { return hasHotswapStack; } + public com.google.protobuf.ByteString getHotswapStack() { return hotswapStack_; } + + private void initFields() { + originalAddress_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance(); + lifeCycle_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); + supervisor_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); + } + public final boolean isInitialized() { + if (!hasUuid) return false; + if (!hasId) return false; + if (!hasActorClassname) return false; + if (!hasActorInstance) return false; + if (!hasSerializerClassname) return false; + if (!hasOriginalAddress) return false; + if (!getOriginalAddress().isInitialized()) return false; + if (hasLifeCycle()) { + if (!getLifeCycle().isInitialized()) return false; + } + if (hasSupervisor()) { + if (!getSupervisor().isInitialized()) return false; + } + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasUuid()) { + output.writeString(1, getUuid()); + } + if (hasId()) { + output.writeString(2, getId()); + } + if (hasActorClassname()) { + output.writeString(3, getActorClassname()); + } + if (hasActorInstance()) { + output.writeBytes(4, getActorInstance()); + } + if (hasSerializerClassname()) { + output.writeString(5, getSerializerClassname()); + } + if (hasOriginalAddress()) { + output.writeMessage(6, getOriginalAddress()); + } + if (hasIsTransactor()) { + output.writeBool(7, getIsTransactor()); + } + if (hasTimeout()) { + output.writeUInt64(8, getTimeout()); + } + if (hasLifeCycle()) { + output.writeMessage(9, getLifeCycle()); + } + if (hasSupervisor()) { + output.writeMessage(10, getSupervisor()); + } + if (hasHotswapStack()) { + output.writeBytes(11, getHotswapStack()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasUuid()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(1, getUuid()); + } + if (hasId()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(2, getId()); + } + if (hasActorClassname()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(3, getActorClassname()); + } + if (hasActorInstance()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getActorInstance()); + } + if (hasSerializerClassname()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(5, getSerializerClassname()); + } + if (hasOriginalAddress()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getOriginalAddress()); + } + if (hasIsTransactor()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, getIsTransactor()); + } + if (hasTimeout()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(8, getTimeout()); + } + if (hasLifeCycle()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getLifeCycle()); + } + if (hasSupervisor()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getSupervisor()); + } + if (hasHotswapStack()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getHotswapStack()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance()) return this; + if (other.hasUuid()) { + setUuid(other.getUuid()); + } + if (other.hasId()) { + setId(other.getId()); + } + if (other.hasActorClassname()) { + setActorClassname(other.getActorClassname()); + } + if (other.hasActorInstance()) { + setActorInstance(other.getActorInstance()); + } + if (other.hasSerializerClassname()) { + setSerializerClassname(other.getSerializerClassname()); + } + if (other.hasOriginalAddress()) { + mergeOriginalAddress(other.getOriginalAddress()); + } + if (other.hasIsTransactor()) { + setIsTransactor(other.getIsTransactor()); + } + if (other.hasTimeout()) { + setTimeout(other.getTimeout()); + } + if (other.hasLifeCycle()) { + mergeLifeCycle(other.getLifeCycle()); + } + if (other.hasSupervisor()) { + mergeSupervisor(other.getSupervisor()); + } + if (other.hasHotswapStack()) { + setHotswapStack(other.getHotswapStack()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setUuid(input.readString()); + break; + } + case 18: { + setId(input.readString()); + break; + } + case 26: { + setActorClassname(input.readString()); + break; + } + case 34: { + setActorInstance(input.readBytes()); + break; + } + case 42: { + setSerializerClassname(input.readString()); + break; + } + case 50: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.newBuilder(); + if (hasOriginalAddress()) { + subBuilder.mergeFrom(getOriginalAddress()); + } + input.readMessage(subBuilder, extensionRegistry); + setOriginalAddress(subBuilder.buildPartial()); + break; + } + case 56: { + setIsTransactor(input.readBool()); + break; + } + case 64: { + setTimeout(input.readUInt64()); + break; + } + case 74: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.newBuilder(); + if (hasLifeCycle()) { + subBuilder.mergeFrom(getLifeCycle()); + } + input.readMessage(subBuilder, extensionRegistry); + setLifeCycle(subBuilder.buildPartial()); + break; + } + case 82: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder(); + if (hasSupervisor()) { + subBuilder.mergeFrom(getSupervisor()); + } + input.readMessage(subBuilder, extensionRegistry); + setSupervisor(subBuilder.buildPartial()); + break; + } + case 90: { + setHotswapStack(input.readBytes()); + break; + } + } + } + } + + + // required string uuid = 1; + 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 string id = 2; + public boolean hasId() { + return result.hasId(); + } + public java.lang.String getId() { + return result.getId(); + } + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasId = true; + result.id_ = value; + return this; + } + public Builder clearId() { + result.hasId = false; + result.id_ = getDefaultInstance().getId(); + return this; + } + + // required string actorClassname = 3; + public boolean hasActorClassname() { + return result.hasActorClassname(); + } + public java.lang.String getActorClassname() { + return result.getActorClassname(); + } + public Builder setActorClassname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasActorClassname = true; + result.actorClassname_ = value; + return this; + } + public Builder clearActorClassname() { + result.hasActorClassname = false; + result.actorClassname_ = getDefaultInstance().getActorClassname(); + return this; + } + + // required bytes actorInstance = 4; + public boolean hasActorInstance() { + return result.hasActorInstance(); + } + public com.google.protobuf.ByteString getActorInstance() { + return result.getActorInstance(); + } + public Builder setActorInstance(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasActorInstance = true; + result.actorInstance_ = value; + return this; + } + public Builder clearActorInstance() { + result.hasActorInstance = false; + result.actorInstance_ = getDefaultInstance().getActorInstance(); + return this; + } + + // required string serializerClassname = 5; + public boolean hasSerializerClassname() { + return result.hasSerializerClassname(); + } + public java.lang.String getSerializerClassname() { + return result.getSerializerClassname(); + } + public Builder setSerializerClassname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasSerializerClassname = true; + result.serializerClassname_ = value; + return this; + } + public Builder clearSerializerClassname() { + result.hasSerializerClassname = false; + result.serializerClassname_ = getDefaultInstance().getSerializerClassname(); + return this; + } + + // required .AddressProtocol originalAddress = 6; + public boolean hasOriginalAddress() { + return result.hasOriginalAddress(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol getOriginalAddress() { + return result.getOriginalAddress(); + } + public Builder setOriginalAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasOriginalAddress = true; + result.originalAddress_ = value; + return this; + } + public Builder setOriginalAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder builderForValue) { + result.hasOriginalAddress = true; + result.originalAddress_ = builderForValue.build(); + return this; + } + public Builder mergeOriginalAddress(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol value) { + if (result.hasOriginalAddress() && + result.originalAddress_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance()) { + result.originalAddress_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.newBuilder(result.originalAddress_).mergeFrom(value).buildPartial(); + } else { + result.originalAddress_ = value; + } + result.hasOriginalAddress = true; + return this; + } + public Builder clearOriginalAddress() { + result.hasOriginalAddress = false; + result.originalAddress_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.getDefaultInstance(); + return this; + } + + // optional bool isTransactor = 7; + public boolean hasIsTransactor() { + return result.hasIsTransactor(); + } + public boolean getIsTransactor() { + return result.getIsTransactor(); + } + public Builder setIsTransactor(boolean value) { + result.hasIsTransactor = true; + result.isTransactor_ = value; + return this; + } + public Builder clearIsTransactor() { + result.hasIsTransactor = false; + result.isTransactor_ = false; + return this; + } + + // optional uint64 timeout = 8; + 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; + } + + // optional .LifeCycleProtocol lifeCycle = 9; + public boolean hasLifeCycle() { + return result.hasLifeCycle(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol getLifeCycle() { + return result.getLifeCycle(); + } + public Builder setLifeCycle(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasLifeCycle = true; + result.lifeCycle_ = value; + return this; + } + public Builder setLifeCycle(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.Builder builderForValue) { + result.hasLifeCycle = true; + result.lifeCycle_ = builderForValue.build(); + return this; + } + public Builder mergeLifeCycle(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol value) { + if (result.hasLifeCycle() && + result.lifeCycle_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDefaultInstance()) { + result.lifeCycle_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.newBuilder(result.lifeCycle_).mergeFrom(value).buildPartial(); + } else { + result.lifeCycle_ = value; + } + result.hasLifeCycle = true; + return this; + } + public Builder clearLifeCycle() { + result.hasLifeCycle = false; + result.lifeCycle_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); + return this; + } + + // optional .RemoteActorRefProtocol supervisor = 10; + public boolean hasSupervisor() { + return result.hasSupervisor(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getSupervisor() { + return result.getSupervisor(); + } + public Builder setSupervisor(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasSupervisor = true; + result.supervisor_ = value; + return this; + } + public Builder setSupervisor(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder builderForValue) { + result.hasSupervisor = true; + result.supervisor_ = builderForValue.build(); + return this; + } + public Builder mergeSupervisor(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) { + if (result.hasSupervisor() && + result.supervisor_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) { + result.supervisor_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder(result.supervisor_).mergeFrom(value).buildPartial(); + } else { + result.supervisor_ = value; + } + result.hasSupervisor = true; + return this; + } + public Builder clearSupervisor() { + result.hasSupervisor = false; + result.supervisor_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); + return this; + } + + // optional bytes hotswapStack = 11; + public boolean hasHotswapStack() { + return result.hasHotswapStack(); + } + public com.google.protobuf.ByteString getHotswapStack() { + return result.getHotswapStack(); + } + public Builder setHotswapStack(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasHotswapStack = true; + result.hotswapStack_ = value; + return this; + } + public Builder clearHotswapStack() { + result.hasHotswapStack = false; + result.hotswapStack_ = getDefaultInstance().getHotswapStack(); + return this; + } + + // @@protoc_insertion_point(builder_scope:SerializedActorRefProtocol) + } + + static { + defaultInstance = new SerializedActorRefProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:SerializedActorRefProtocol) + } + + public static final class RemoteRequestProtocol extends + com.google.protobuf.GeneratedMessage { + // Use RemoteRequestProtocol.newBuilder() to construct. + private RemoteRequestProtocol() { + initFields(); + } + private RemoteRequestProtocol(boolean noInit) {} + + private static final RemoteRequestProtocol defaultInstance; + public static RemoteRequestProtocol getDefaultInstance() { + return defaultInstance; + } + + public RemoteRequestProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteRequestProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteRequestProtocol_fieldAccessorTable; + } + + // required uint64 id = 1; + public static final int ID_FIELD_NUMBER = 1; + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } + + // required .SerializationSchemeType serializationScheme = 2; + public static final int SERIALIZATIONSCHEME_FIELD_NUMBER = 2; + private boolean hasSerializationScheme; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType serializationScheme_; + public boolean hasSerializationScheme() { return hasSerializationScheme; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType getSerializationScheme() { return serializationScheme_; } + + // 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_; } + + // optional bytes messageManifest = 4; + public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; + private boolean hasMessageManifest; + private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMessageManifest() { return hasMessageManifest; } + public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } + + // optional string method = 5; + public static final int METHOD_FIELD_NUMBER = 5; + private boolean hasMethod; + private java.lang.String method_ = ""; + public boolean hasMethod() { return hasMethod; } + public java.lang.String getMethod() { return method_; } + + // required string target = 6; + public static final int TARGET_FIELD_NUMBER = 6; + private boolean hasTarget; + private java.lang.String target_ = ""; + public boolean hasTarget() { return hasTarget; } + public java.lang.String getTarget() { return target_; } + + // 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 = 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 = 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 = 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 = 12; + public static final int ISESCAPED_FIELD_NUMBER = 12; + private boolean hasIsEscaped; + private boolean isEscaped_ = false; + public boolean hasIsEscaped() { return hasIsEscaped; } + public boolean getIsEscaped() { return isEscaped_; } + + // optional .RemoteActorRefProtocol sender = 13; + public static final int SENDER_FIELD_NUMBER = 13; + private boolean hasSender; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol sender_; + public boolean hasSender() { return hasSender; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getSender() { return sender_; } + + private void initFields() { + serializationScheme_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.JAVA; + sender_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); + } + public final boolean isInitialized() { + if (!hasId) return false; + if (!hasSerializationScheme) 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; + if (!hasIsEscaped) return false; + if (hasSender()) { + if (!getSender().isInitialized()) return false; + } + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasId()) { + output.writeUInt64(1, getId()); + } + if (hasSerializationScheme()) { + output.writeEnum(2, getSerializationScheme().getNumber()); + } + if (hasMessage()) { + output.writeBytes(3, getMessage()); + } + if (hasMessageManifest()) { + output.writeBytes(4, getMessageManifest()); + } + if (hasMethod()) { + output.writeString(5, getMethod()); + } + if (hasTarget()) { + output.writeString(6, getTarget()); + } + if (hasUuid()) { + output.writeString(7, getUuid()); + } + if (hasTimeout()) { + output.writeUInt64(8, getTimeout()); + } + if (hasSupervisorUuid()) { + output.writeString(9, getSupervisorUuid()); + } + if (hasIsActor()) { + output.writeBool(10, getIsActor()); + } + if (hasIsOneWay()) { + output.writeBool(11, getIsOneWay()); + } + if (hasIsEscaped()) { + output.writeBool(12, getIsEscaped()); + } + if (hasSender()) { + output.writeMessage(13, getSender()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasId()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, getId()); + } + if (hasSerializationScheme()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, getSerializationScheme().getNumber()); + } + if (hasMessage()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getMessage()); + } + if (hasMessageManifest()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getMessageManifest()); + } + if (hasMethod()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(5, getMethod()); + } + if (hasTarget()) { + 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(8, getTimeout()); + } + if (hasSupervisorUuid()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(9, getSupervisorUuid()); + } + if (hasIsActor()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, getIsActor()); + } + if (hasIsOneWay()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, getIsOneWay()); + } + if (hasIsEscaped()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, getIsEscaped()); + } + if (hasSender()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getSender()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance()) return this; + if (other.hasId()) { + setId(other.getId()); + } + if (other.hasSerializationScheme()) { + setSerializationScheme(other.getSerializationScheme()); + } + if (other.hasMessage()) { + setMessage(other.getMessage()); + } + if (other.hasMessageManifest()) { + setMessageManifest(other.getMessageManifest()); + } + if (other.hasMethod()) { + setMethod(other.getMethod()); + } + if (other.hasTarget()) { + setTarget(other.getTarget()); + } + if (other.hasUuid()) { + setUuid(other.getUuid()); + } + 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.hasSender()) { + mergeSender(other.getSender()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setId(input.readUInt64()); + break; + } + case 16: { + int rawValue = input.readEnum(); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType value = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + setSerializationScheme(value); + } + break; + } + case 26: { + setMessage(input.readBytes()); + break; + } + case 34: { + setMessageManifest(input.readBytes()); + break; + } + case 42: { + setMethod(input.readString()); + break; + } + case 50: { + setTarget(input.readString()); + break; + } + case 58: { + setUuid(input.readString()); + break; + } + case 64: { + setTimeout(input.readUInt64()); + break; + } + case 74: { + setSupervisorUuid(input.readString()); + break; + } + case 80: { + setIsActor(input.readBool()); + break; + } + case 88: { + setIsOneWay(input.readBool()); + break; + } + case 96: { + setIsEscaped(input.readBool()); + break; + } + case 106: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder(); + if (hasSender()) { + subBuilder.mergeFrom(getSender()); + } + input.readMessage(subBuilder, extensionRegistry); + setSender(subBuilder.buildPartial()); + break; + } + } + } + } + + + // required uint64 id = 1; + 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 .SerializationSchemeType serializationScheme = 2; + public boolean hasSerializationScheme() { + return result.hasSerializationScheme(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType getSerializationScheme() { + return result.getSerializationScheme(); + } + public Builder setSerializationScheme(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasSerializationScheme = true; + result.serializationScheme_ = value; + return this; + } + public Builder clearSerializationScheme() { + result.hasSerializationScheme = false; + result.serializationScheme_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.JAVA; + 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_ = getDefaultInstance().getMessage(); + return this; + } + + // optional bytes messageManifest = 4; + public boolean hasMessageManifest() { + return result.hasMessageManifest(); + } + public com.google.protobuf.ByteString getMessageManifest() { + return result.getMessageManifest(); + } + public Builder setMessageManifest(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasMessageManifest = true; + result.messageManifest_ = value; + return this; + } + public Builder clearMessageManifest() { + result.hasMessageManifest = false; + result.messageManifest_ = getDefaultInstance().getMessageManifest(); + return this; + } + + // optional string method = 5; + 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_ = getDefaultInstance().getMethod(); + return this; + } + + // required string target = 6; + 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_ = getDefaultInstance().getTarget(); + return this; + } + + // 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(); + } + 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; + } + + // optional string supervisorUuid = 9; + 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_ = getDefaultInstance().getSupervisorUuid(); + return this; + } + + // required bool isActor = 10; + 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 = 11; + 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 = 12; + 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; + } + + // optional .RemoteActorRefProtocol sender = 13; + public boolean hasSender() { + return result.hasSender(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getSender() { + return result.getSender(); + } + public Builder setSender(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasSender = true; + result.sender_ = value; + return this; + } + public Builder setSender(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder builderForValue) { + result.hasSender = true; + result.sender_ = builderForValue.build(); + return this; + } + public Builder mergeSender(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) { + if (result.hasSender() && + result.sender_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) { + result.sender_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder(result.sender_).mergeFrom(value).buildPartial(); + } else { + result.sender_ = value; + } + result.hasSender = true; + return this; + } + public Builder clearSender() { + result.hasSender = false; + result.sender_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); + return this; + } + + // @@protoc_insertion_point(builder_scope:RemoteRequestProtocol) + } + + static { + defaultInstance = new RemoteRequestProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RemoteRequestProtocol) + } + + public static final class RemoteReplyProtocol extends + com.google.protobuf.GeneratedMessage { + // Use RemoteReplyProtocol.newBuilder() to construct. + private RemoteReplyProtocol() { + initFields(); + } + private RemoteReplyProtocol(boolean noInit) {} + + private static final RemoteReplyProtocol defaultInstance; + public static RemoteReplyProtocol getDefaultInstance() { + return defaultInstance; + } + + public RemoteReplyProtocol getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteReplyProtocol_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteReplyProtocol_fieldAccessorTable; + } + + // required uint64 id = 1; + public static final int ID_FIELD_NUMBER = 1; + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } + + // optional .SerializationSchemeType serializationScheme = 2; + public static final int SERIALIZATIONSCHEME_FIELD_NUMBER = 2; + private boolean hasSerializationScheme; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType serializationScheme_; + public boolean hasSerializationScheme() { return hasSerializationScheme; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType getSerializationScheme() { return serializationScheme_; } + + // optional 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_; } + + // optional bytes messageManifest = 4; + public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; + private boolean hasMessageManifest; + private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMessageManifest() { return hasMessageManifest; } + public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } + + // optional .ExceptionProtocol exception = 5; + public static final int EXCEPTION_FIELD_NUMBER = 5; + private boolean hasException; + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol exception_; + public boolean hasException() { return hasException; } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol getException() { return exception_; } + + // optional string supervisorUuid = 6; + public static final int SUPERVISORUUID_FIELD_NUMBER = 6; + private boolean hasSupervisorUuid; + private java.lang.String supervisorUuid_ = ""; + public boolean hasSupervisorUuid() { return hasSupervisorUuid; } + public java.lang.String getSupervisorUuid() { return supervisorUuid_; } + + // required bool isActor = 7; + public static final int ISACTOR_FIELD_NUMBER = 7; + private boolean hasIsActor; + private boolean isActor_ = false; + public boolean hasIsActor() { return hasIsActor; } + public boolean getIsActor() { return isActor_; } + + // required bool isSuccessful = 8; + public static final int ISSUCCESSFUL_FIELD_NUMBER = 8; + private boolean hasIsSuccessful; + private boolean isSuccessful_ = false; + public boolean hasIsSuccessful() { return hasIsSuccessful; } + public boolean getIsSuccessful() { return isSuccessful_; } + + private void initFields() { + serializationScheme_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.JAVA; + exception_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); + } + public final boolean isInitialized() { + if (!hasId) return false; + if (!hasIsActor) return false; + if (!hasIsSuccessful) return false; + if (hasException()) { + if (!getException().isInitialized()) return false; + } + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasId()) { + output.writeUInt64(1, getId()); + } + if (hasSerializationScheme()) { + output.writeEnum(2, getSerializationScheme().getNumber()); + } + if (hasMessage()) { + output.writeBytes(3, getMessage()); + } + if (hasMessageManifest()) { + output.writeBytes(4, getMessageManifest()); + } + if (hasException()) { + output.writeMessage(5, getException()); + } + if (hasSupervisorUuid()) { + output.writeString(6, getSupervisorUuid()); + } + if (hasIsActor()) { + output.writeBool(7, getIsActor()); + } + if (hasIsSuccessful()) { + output.writeBool(8, getIsSuccessful()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasId()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, getId()); + } + if (hasSerializationScheme()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, getSerializationScheme().getNumber()); + } + if (hasMessage()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getMessage()); + } + if (hasMessageManifest()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getMessageManifest()); + } + if (hasException()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getException()); + } + if (hasSupervisorUuid()) { + size += com.google.protobuf.CodedOutputStream + .computeStringSize(6, getSupervisorUuid()); + } + if (hasIsActor()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, getIsActor()); + } + if (hasIsSuccessful()) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, getIsSuccessful()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol result; + + // Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol(); + return builder; + } + + protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.getDescriptor(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol getDefaultInstanceForType() { + return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol) { + return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol other) { + if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance()) return this; + if (other.hasId()) { + setId(other.getId()); + } + if (other.hasSerializationScheme()) { + setSerializationScheme(other.getSerializationScheme()); + } + if (other.hasMessage()) { + setMessage(other.getMessage()); + } + if (other.hasMessageManifest()) { + setMessageManifest(other.getMessageManifest()); + } + if (other.hasException()) { + mergeException(other.getException()); + } + if (other.hasSupervisorUuid()) { + setSupervisorUuid(other.getSupervisorUuid()); + } + if (other.hasIsActor()) { + setIsActor(other.getIsActor()); + } + if (other.hasIsSuccessful()) { + setIsSuccessful(other.getIsSuccessful()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setId(input.readUInt64()); + break; + } + case 16: { + int rawValue = input.readEnum(); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType value = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + setSerializationScheme(value); + } + break; + } + case 26: { + setMessage(input.readBytes()); + break; + } + case 34: { + setMessageManifest(input.readBytes()); + break; + } + case 42: { + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.newBuilder(); + if (hasException()) { + subBuilder.mergeFrom(getException()); + } + input.readMessage(subBuilder, extensionRegistry); + setException(subBuilder.buildPartial()); + break; + } + case 50: { + setSupervisorUuid(input.readString()); + break; + } + case 56: { + setIsActor(input.readBool()); + break; + } + case 64: { + setIsSuccessful(input.readBool()); + break; + } + } + } + } + + + // required uint64 id = 1; + 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; + } + + // optional .SerializationSchemeType serializationScheme = 2; + public boolean hasSerializationScheme() { + return result.hasSerializationScheme(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType getSerializationScheme() { + return result.getSerializationScheme(); + } + public Builder setSerializationScheme(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasSerializationScheme = true; + result.serializationScheme_ = value; + return this; + } + public Builder clearSerializationScheme() { + result.hasSerializationScheme = false; + result.serializationScheme_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializationSchemeType.JAVA; + return this; + } + + // optional 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_ = getDefaultInstance().getMessage(); + return this; + } + + // optional bytes messageManifest = 4; + public boolean hasMessageManifest() { + return result.hasMessageManifest(); + } + public com.google.protobuf.ByteString getMessageManifest() { + return result.getMessageManifest(); + } + public Builder setMessageManifest(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasMessageManifest = true; + result.messageManifest_ = value; + return this; + } + public Builder clearMessageManifest() { + result.hasMessageManifest = false; + result.messageManifest_ = getDefaultInstance().getMessageManifest(); + return this; + } + + // optional .ExceptionProtocol exception = 5; + public boolean hasException() { + return result.hasException(); + } + public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol getException() { + return result.getException(); + } + public Builder setException(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol value) { + if (value == null) { + throw new NullPointerException(); + } + result.hasException = true; + result.exception_ = value; + return this; + } + public Builder setException(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.Builder builderForValue) { + result.hasException = true; + result.exception_ = builderForValue.build(); + return this; + } + public Builder mergeException(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol value) { + if (result.hasException() && + result.exception_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDefaultInstance()) { + result.exception_ = + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.newBuilder(result.exception_).mergeFrom(value).buildPartial(); + } else { + result.exception_ = value; + } + result.hasException = true; + return this; + } + public Builder clearException() { + result.hasException = false; + result.exception_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); + return this; + } + + // optional string supervisorUuid = 6; + 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_ = getDefaultInstance().getSupervisorUuid(); + return this; + } + + // required bool isActor = 7; + 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 isSuccessful = 8; + 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; + } + + // @@protoc_insertion_point(builder_scope:RemoteReplyProtocol) + } + + static { + defaultInstance = new RemoteReplyProtocol(true); + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RemoteReplyProtocol) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_LifeCycleProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_LifeCycleProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_AddressProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_AddressProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_ExceptionProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ExceptionProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RemoteActorRefProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RemoteActorRefProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_SerializedActorRefProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_SerializedActorRefProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RemoteRequestProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RemoteRequestProtocol_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RemoteReplyProtocol_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RemoteReplyProtocol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024RemoteProtocol.proto\"_\n\021LifeCycleProto" + + "col\022!\n\tlifeCycle\030\001 \002(\0162\016.LifeCycleType\022\022" + + "\n\npreRestart\030\002 \001(\t\022\023\n\013postRestart\030\003 \001(\t\"" + + "1\n\017AddressProtocol\022\020\n\010hostname\030\001 \002(\t\022\014\n\004" + + "port\030\002 \002(\r\"7\n\021ExceptionProtocol\022\021\n\tclass" + + "name\030\001 \002(\t\022\017\n\007message\030\002 \002(\t\"v\n\026RemoteAct" + + "orRefProtocol\022\014\n\004uuid\030\001 \002(\t\022\026\n\016actorClas" + + "sname\030\002 \002(\t\022%\n\013homeAddress\030\003 \002(\0132\020.Addre" + + "ssProtocol\022\017\n\007timeout\030\004 \001(\004\"\276\002\n\032Serializ" + + "edActorRefProtocol\022\014\n\004uuid\030\001 \002(\t\022\n\n\002id\030\002", + " \002(\t\022\026\n\016actorClassname\030\003 \002(\t\022\025\n\ractorIns" + + "tance\030\004 \002(\014\022\033\n\023serializerClassname\030\005 \002(\t" + + "\022)\n\017originalAddress\030\006 \002(\0132\020.AddressProto" + + "col\022\024\n\014isTransactor\030\007 \001(\010\022\017\n\007timeout\030\010 \001" + + "(\004\022%\n\tlifeCycle\030\t \001(\0132\022.LifeCycleProtoco" + + "l\022+\n\nsupervisor\030\n \001(\0132\027.RemoteActorRefPr" + + "otocol\022\024\n\014hotswapStack\030\013 \001(\014\"\272\002\n\025RemoteR" + + "equestProtocol\022\n\n\002id\030\001 \002(\004\0225\n\023serializat" + + "ionScheme\030\002 \002(\0162\030.SerializationSchemeTyp" + + "e\022\017\n\007message\030\003 \002(\014\022\027\n\017messageManifest\030\004 ", + "\001(\014\022\016\n\006method\030\005 \001(\t\022\016\n\006target\030\006 \002(\t\022\014\n\004u" + + "uid\030\007 \002(\t\022\017\n\007timeout\030\010 \002(\004\022\026\n\016supervisor" + + "Uuid\030\t \001(\t\022\017\n\007isActor\030\n \002(\010\022\020\n\010isOneWay\030" + + "\013 \002(\010\022\021\n\tisEscaped\030\014 \002(\010\022\'\n\006sender\030\r \001(\013" + + "2\027.RemoteActorRefProtocol\"\350\001\n\023RemoteRepl" + + "yProtocol\022\n\n\002id\030\001 \002(\004\0225\n\023serializationSc" + + "heme\030\002 \001(\0162\030.SerializationSchemeType\022\017\n\007" + + "message\030\003 \001(\014\022\027\n\017messageManifest\030\004 \001(\014\022%" + + "\n\texception\030\005 \001(\0132\022.ExceptionProtocol\022\026\n" + + "\016supervisorUuid\030\006 \001(\t\022\017\n\007isActor\030\007 \002(\010\022\024", + "\n\014isSuccessful\030\010 \002(\010*]\n\027SerializationSch" + + "emeType\022\010\n\004JAVA\020\001\022\013\n\007SBINARY\020\002\022\016\n\nSCALA_" + + "JSON\020\003\022\r\n\tJAVA_JSON\020\004\022\014\n\010PROTOBUF\020\005*-\n\rL" + + "ifeCycleType\022\r\n\tPERMANENT\020\001\022\r\n\tTEMPORARY" + + "\020\002B-\n)se.scalablesolutions.akka.remote.p" + + "rotocolH\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_LifeCycleProtocol_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LifeCycleProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_LifeCycleProtocol_descriptor, + new java.lang.String[] { "LifeCycle", "PreRestart", "PostRestart", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.Builder.class); + internal_static_AddressProtocol_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_AddressProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_AddressProtocol_descriptor, + new java.lang.String[] { "Hostname", "Port", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder.class); + internal_static_ExceptionProtocol_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_ExceptionProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ExceptionProtocol_descriptor, + new java.lang.String[] { "Classname", "Message", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ExceptionProtocol.Builder.class); + internal_static_RemoteActorRefProtocol_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_RemoteActorRefProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RemoteActorRefProtocol_descriptor, + new java.lang.String[] { "Uuid", "ActorClassname", "HomeAddress", "Timeout", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder.class); + internal_static_SerializedActorRefProtocol_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_SerializedActorRefProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_SerializedActorRefProtocol_descriptor, + new java.lang.String[] { "Uuid", "Id", "ActorClassname", "ActorInstance", "SerializerClassname", "OriginalAddress", "IsTransactor", "Timeout", "LifeCycle", "Supervisor", "HotswapStack", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.Builder.class); + internal_static_RemoteRequestProtocol_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_RemoteRequestProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RemoteRequestProtocol_descriptor, + new java.lang.String[] { "Id", "SerializationScheme", "Message", "MessageManifest", "Method", "Target", "Uuid", "Timeout", "SupervisorUuid", "IsActor", "IsOneWay", "IsEscaped", "Sender", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.Builder.class); + internal_static_RemoteReplyProtocol_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_RemoteReplyProtocol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RemoteReplyProtocol_descriptor, + new java.lang.String[] { "Id", "SerializationScheme", "Message", "MessageManifest", "Exception", "SupervisorUuid", "IsActor", "IsSuccessful", }, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.class, + se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.Builder.class); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + public static void internalForceInit() {} + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/akka-core/src/main/protocol/RemoteProtocol.proto b/akka-core/src/main/protocol/RemoteProtocol.proto new file mode 100644 index 0000000000..e967d8b3ac --- /dev/null +++ b/akka-core/src/main/protocol/RemoteProtocol.proto @@ -0,0 +1,129 @@ +/** + * Copyright (C) 2009-2010 Scalable Solutions AB + */ + +option java_package = "se.scalablesolutions.akka.remote.protocol"; +option optimize_for = SPEED; + +/****************************************** + Compile with: + cd ./akka-core/src/main/protocol + protoc RemoteProtocol.proto --java_out ../java +*******************************************/ + +/** + * Defines a remote ActorRef that "remembers" and uses its original Actor instance + * on the original node. + */ +message RemoteActorRefProtocol { + required string uuid = 1; + required string actorClassname = 2; + required AddressProtocol homeAddress = 3; + optional uint64 timeout = 4; +} + +/** + * Defines a fully serialized remote ActorRef (with serialized Actor instance) + * that is about to be instantiated on the remote node. It is fully disconnected + * from its original host. + */ +message SerializedActorRefProtocol { + required string uuid = 1; + required string id = 2; + required string actorClassname = 3; + required bytes actorInstance = 4; + required string serializerClassname = 5; + required AddressProtocol originalAddress = 6; + optional bool isTransactor = 7; + optional uint64 timeout = 8; + optional LifeCycleProtocol lifeCycle = 9; + optional RemoteActorRefProtocol supervisor = 10; + optional bytes hotswapStack = 11; +} + +/** + * Defines a remote message request. + */ +message RemoteRequestProtocol { + required uint64 id = 1; + required SerializationSchemeType serializationScheme = 2; + required bytes message = 3; + optional bytes messageManifest = 4; + optional string method = 5; + required string target = 6; + required string uuid = 7; + required uint64 timeout = 8; + optional string supervisorUuid = 9; + required bool isActor = 10; + required bool isOneWay = 11; + required bool isEscaped = 12; + optional RemoteActorRefProtocol sender = 13; +} + +/** + * Defines a remote message reply. + */ +message RemoteReplyProtocol { + required uint64 id = 1; + optional SerializationSchemeType serializationScheme = 2; + optional bytes message = 3; + optional bytes messageManifest = 4; + optional ExceptionProtocol exception = 5; + optional string supervisorUuid = 6; + required bool isActor = 7; + required bool isSuccessful = 8; +} + +/** + * Defines the serialization scheme used to serialize the message and/or Actor instance. + */ +enum SerializationSchemeType { + JAVA = 1; + SBINARY = 2; + SCALA_JSON = 3; + JAVA_JSON = 4; + PROTOBUF = 5; +} + +/** + * Defines the type of the life-cycle of a supervised Actor. + */ +enum LifeCycleType { + PERMANENT = 1; + TEMPORARY = 2; +} + +/* +enum DispatcherType { + GLOBAL_EVENT_EXECUTOR_BASED = 1; + GLOBAL_REACTOR_SINGLE_THREAD_BASED = 2; + GLOBAL_REACTOR_THREAD_POOL_BASED = 3; + EVENT_EXECUTOR_BASED = 4; + THREAD_BASED = 5; +} +*/ + +/** + * Defines the life-cycle of a supervised Actor. + */ +message LifeCycleProtocol { + required LifeCycleType lifeCycle = 1; + optional string preRestart = 2; + optional string postRestart = 3; +} + +/** + * Defines a remote address. + */ +message AddressProtocol { + required string hostname = 1; + required uint32 port = 2; +} + +/** + * Defines an exception. + */ +message ExceptionProtocol { + required string classname = 1; + required string message = 2; +} diff --git a/akka-core/src/main/scala/actor/ActiveObject.scala b/akka-core/src/main/scala/actor/ActiveObject.scala index 8ef49eebda..f83e3f91ed 100644 --- a/akka-core/src/main/scala/actor/ActiveObject.scala +++ b/akka-core/src/main/scala/actor/ActiveObject.scala @@ -5,7 +5,7 @@ package se.scalablesolutions.akka.actor import se.scalablesolutions.akka.config.FaultHandlingStrategy -import se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol +import se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol import se.scalablesolutions.akka.remote.{RemoteProtocolBuilder, RemoteClient, RemoteRequestProtocolIdFactory} import se.scalablesolutions.akka.dispatch.{MessageDispatcher, Future, CompletableFuture} import se.scalablesolutions.akka.config.ScalaConfig._ diff --git a/akka-core/src/main/scala/actor/Actor.scala b/akka-core/src/main/scala/actor/Actor.scala index 4c19e9b115..807355d95e 100644 --- a/akka-core/src/main/scala/actor/Actor.scala +++ b/akka-core/src/main/scala/actor/Actor.scala @@ -8,24 +8,9 @@ import se.scalablesolutions.akka.dispatch._ import se.scalablesolutions.akka.config.Config._ import se.scalablesolutions.akka.config.ScalaConfig._ import se.scalablesolutions.akka.util.Logging +import se.scalablesolutions.akka.serialization.Serializer -/* -// FIXME add support for ActorWithNestedReceive -trait ActorWithNestedReceive extends Actor { - import Actor.actor - private var nestedReactsProcessors: List[ActorRef] = Nil - private val processNestedReacts: Receive = { - case message if !nestedReactsProcessors.isEmpty => - val processors = nestedReactsProcessors.reverse - processors.head forward message - nestedReactsProcessors = processors.tail.reverse - } - - protected def react: Receive - protected def reactAgain(pf: Receive) = nestedReactsProcessors ::= actor(pf) - protected def receive = processNestedReacts orElse react -} -*/ +import com.google.protobuf.Message /** * Implements the Transactor abstraction. E.g. a transactional actor. @@ -49,7 +34,69 @@ abstract class RemoteActor(hostname: String, port: Int) extends Actor { self.makeRemote(hostname, port) } -// Life-cycle messages for the Actors +/** + * Mix in this trait to create a serializable actor, serializable through + * a custom serialization protocol. + * + * @author Jonas Bonér + */ +trait SerializableActor extends Actor { + val serializer: Serializer + def toBinary: Array[Byte] +} + +/** + * Mix in this trait to create a serializable actor, serializable through + * Protobuf. + * + * @author Jonas Bonér + */ +trait ProtobufSerializableActor[T <: Message] extends SerializableActor { + val serializer = Serializer.Protobuf + def toBinary: Array[Byte] = toProtobuf.toByteArray + def fromBinary(bytes: Array[Byte]) = fromProtobuf(serializer.fromBinary(bytes, Some(clazz)).asInstanceOf[T]) + + val clazz: Class[T] + def toProtobuf: T + def fromProtobuf(message: T): Unit +} + +/** + * Mix in this trait to create a serializable actor, serializable through + * Java serialization. + * + * @author Jonas Bonér + */ +trait JavaSerializableActor extends SerializableActor { + @transient val serializer = Serializer.Java + def toBinary: Array[Byte] = serializer.toBinary(this) +} + +/** + * Mix in this trait to create a serializable actor, serializable through + * a Java JSON parser (Jackson). + * + * @author Jonas Bonér + */ +trait JavaJSONSerializableActor extends SerializableActor { + val serializer = Serializer.JavaJSON + def toBinary: Array[Byte] = serializer.toBinary(this) +} + +/** + * Mix in this trait to create a serializable actor, serializable through + * a Scala JSON parser (SJSON). + * + * @author Jonas Bonér + */ +trait ScalaJSONSerializableActor extends SerializableActor { + val serializer = Serializer.ScalaJSON + def toBinary: Array[Byte] = serializer.toBinary(this) +} + +/** + * Life-cycle messages for the Actors + */ @serializable sealed trait LifeCycleMessage case class HotSwap(code: Option[Actor.Receive]) extends LifeCycleMessage case class Restart(reason: Throwable) extends LifeCycleMessage @@ -299,7 +346,7 @@ trait Actor extends Logging { * Mainly for internal use, functions as the implicit sender references when invoking * one of the message send functions ('!', '!!' and '!!!'). */ - implicit val optionSelf: Option[ActorRef] = { + @transient implicit val optionSelf: Option[ActorRef] = { val ref = Actor.actorRefInCreation.value Actor.actorRefInCreation.value = None if (ref.isEmpty) throw new ActorInitializationException( @@ -308,7 +355,7 @@ trait Actor extends Logging { "\n\tYou have to use one of the factory methods in the 'Actor' object to create a new actor." + "\n\tEither use:" + "\n\t\t'val actor = Actor.actorOf[MyActor]', or" + - "\n\t\t'val actor = Actor.actorOf(new MyActor(..))'" + + "\n\t\t'val actor = Actor.actorOf(new MyActor(..))', or" + "\n\t\t'val actor = Actor.actor { case msg => .. } }'") else ref } @@ -319,7 +366,7 @@ trait Actor extends Logging { * Mainly for internal use, functions as the implicit sender references when invoking * the 'forward' function. */ - implicit val someSelf: Some[ActorRef] = optionSelf.asInstanceOf[Some[ActorRef]] + @transient implicit val someSelf: Some[ActorRef] = optionSelf.asInstanceOf[Some[ActorRef]] /** * The 'self' field holds the ActorRef for this actor. @@ -348,7 +395,7 @@ trait Actor extends Logging { * self.stop(..) * */ - val self: ActorRef = { + @transient val self: ActorRef = { val zelf = optionSelf.get zelf.id = getClass.getName zelf @@ -448,10 +495,4 @@ trait Actor extends Logging { case UnlinkAndStop(child) => self.unlink(child); child.stop case Kill => throw new ActorKilledException("Actor [" + toString + "] was killed by a Kill message") } - - override def hashCode: Int = self.hashCode - - override def equals(that: Any): Boolean = self.equals(that) - - override def toString = self.toString } diff --git a/akka-core/src/main/scala/actor/ActorRef.scala b/akka-core/src/main/scala/actor/ActorRef.scala index 0531a43438..4179201680 100644 --- a/akka-core/src/main/scala/actor/ActorRef.scala +++ b/akka-core/src/main/scala/actor/ActorRef.scala @@ -11,7 +11,7 @@ import se.scalablesolutions.akka.config.ScalaConfig._ import se.scalablesolutions.akka.stm.Transaction.Global._ import se.scalablesolutions.akka.stm.TransactionManagement._ import se.scalablesolutions.akka.stm.TransactionManagement -import se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.{RemoteRequestProtocol, RemoteReplyProtocol, ActorRefProtocol} +import se.scalablesolutions.akka.remote.protocol.RemoteProtocol._ import se.scalablesolutions.akka.remote.{RemoteNode, RemoteServer, RemoteClient, RemoteProtocolBuilder, RemoteRequestProtocolIdFactory} import se.scalablesolutions.akka.serialization.Serializer import se.scalablesolutions.akka.util.{HashCode, Logging, UUID, ReentrantGuard} @@ -28,45 +28,119 @@ import java.util.concurrent.ConcurrentHashMap import java.util.{Map => JMap} import java.lang.reflect.Field +import com.google.protobuf.ByteString + /** * The ActorRef object can be used to deserialize ActorRef instances from of its binary representation * or its Protocol Buffers (protobuf) Message representation to a Actor.actorOf instance. + * *

* Binary -> ActorRef: *

  *   val actorRef = ActorRef.fromBinary(bytes)
  *   actorRef ! message // send message to remote actor through its reference
  * 
+ * *

- * Protobuf Message -> ActorRef: + * Protobuf Message -> RemoteActorRef: *

- *   val actorRef = ActorRef.fromProtobuf(protobufMessage)
+ *   val actorRef = ActorRef.fromBinaryToRemoteActorRef(protobufMessage)
  *   actorRef ! message // send message to remote actor through its reference
  * 
+ * + *

+ * Protobuf Message -> LocalActorRef: + *

+ *   val actorRef = ActorRef.fromBinaryToLocalActorRef(protobufMessage)
+ *   actorRef ! message // send message to local actor through its reference
+ * 
+ * * @author Jonas Bonér */ object ActorRef { /** - * Deserializes the ActorRef instance from a byte array (Array[Byte]) into an ActorRef instance. + * Deserializes a byte array (Array[Byte]) into an RemoteActorRef instance. */ - def fromBinary(bytes: Array[Byte]): ActorRef = - fromProtobuf(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) + def fromBinaryToRemoteActorRef(bytes: Array[Byte]): ActorRef = + fromProtobufToRemoteActorRef(RemoteActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) - def fromBinary(bytes: Array[Byte], loader: ClassLoader): ActorRef = - fromProtobuf(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) + /** + * Deserializes a byte array (Array[Byte]) into an RemoteActorRef instance. + */ + def fromBinaryToRemoteActorRef(bytes: Array[Byte], loader: ClassLoader): ActorRef = + fromProtobufToRemoteActorRef(RemoteActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) /** - * Deserializes the ActorRef instance from a Protocol Buffers (protobuf) Message into an ActorRef instance. + * Deserializes a RemoteActorRefProtocol Protocol Buffers (protobuf) Message into an RemoteActorRef instance. */ - private[akka] def fromProtobuf(protocol: ActorRefProtocol, loader: Option[ClassLoader]): ActorRef = + private[akka] def fromProtobufToRemoteActorRef(protocol: RemoteActorRefProtocol, loader: Option[ClassLoader]): ActorRef = RemoteActorRef( protocol.getUuid, - protocol.getActorClassName, - protocol.getSourceHostname, - protocol.getSourcePort, + protocol.getActorClassname, + protocol.getHomeAddress.getHostname, + protocol.getHomeAddress.getPort, protocol.getTimeout, loader) + + /** + * Deserializes a byte array (Array[Byte]) into an LocalActorRef instance. + */ + def fromBinaryToLocalActorRef(bytes: Array[Byte]): ActorRef = + fromProtobufToLocalActorRef(SerializedActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) + + /** + * Deserializes a byte array (Array[Byte]) into an LocalActorRef instance. + */ + def fromBinaryToLocalActorRef(bytes: Array[Byte], loader: ClassLoader): ActorRef = + fromProtobufToLocalActorRef(SerializedActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) + + /** + * Deserializes a SerializedActorRefProtocol Protocol Buffers (protobuf) Message into an LocalActorRef instance. + */ + private[akka] def fromProtobufToLocalActorRef(protocol: SerializedActorRefProtocol, loader: Option[ClassLoader]): ActorRef = { + val serializerClass = + if (loader.isDefined) loader.get.loadClass(protocol.getSerializerClassname) + else Class.forName(protocol.getSerializerClassname) + val serializer = serializerClass.newInstance.asInstanceOf[Serializer] + + val lifeCycle = + if (protocol.hasLifeCycle) { + val lifeCycleProtocol = protocol.getLifeCycle + val restartCallbacks = + if (lifeCycleProtocol.hasPreRestart || lifeCycleProtocol.hasPostRestart) + Some(RestartCallbacks(lifeCycleProtocol.getPreRestart, lifeCycleProtocol.getPostRestart)) + else None + Some(if (lifeCycleProtocol.getLifeCycle == LifeCycleType.PERMANENT) LifeCycle(Permanent, restartCallbacks) + else if (lifeCycleProtocol.getLifeCycle == LifeCycleType.TEMPORARY) LifeCycle(Temporary, restartCallbacks) + else throw new IllegalStateException("LifeCycle type is not valid: " + lifeCycleProtocol.getLifeCycle)) + } else None + + val supervisor = + if (protocol.hasSupervisor) + Some(fromProtobufToRemoteActorRef(protocol.getSupervisor, loader)) + else None + val hotswap = + if (protocol.hasHotswapStack) Some(serializer + .fromBinary(protocol.getHotswapStack.toByteArray, Some(classOf[PartialFunction[Any, Unit]])) + .asInstanceOf[PartialFunction[Any, Unit]]) + else None + + new LocalActorRef( + protocol.getUuid, + protocol.getId, + protocol.getActorClassname, + protocol.getActorInstance.toByteArray, + protocol.getOriginalAddress.getHostname, + protocol.getOriginalAddress.getPort, + if (protocol.hasIsTransactor) protocol.getIsTransactor else false, + if (protocol.hasTimeout) protocol.getTimeout else Actor.TIMEOUT, + lifeCycle, + supervisor, + hotswap, + loader.getOrElse(getClass.getClassLoader), // TODO: should we fall back to getClass.getClassLoader? + serializer) + } } /** @@ -136,19 +210,25 @@ trait ActorRef extends TransactionManagement { /** * User overridable callback/setting. + * *

* Set trapExit to the list of exception classes that the actor should be able to trap * from the actor it is supervising. When the supervising actor throws these exceptions * then they will trigger a restart. *

+ * + * Trap no exceptions: *

-   * // trap no exceptions
    * trapExit = Nil
+   * 
* - * // trap all exceptions + * Trap all exceptions: + *
    * trapExit = List(classOf[Throwable])
+   * 
* - * // trap specific exceptions only + * Trap specific exceptions only: + *
    * trapExit = List(classOf[MyApplicationException], classOf[MyApplicationError])
    * 
*/ @@ -158,10 +238,13 @@ trait ActorRef extends TransactionManagement { * User overridable callback/setting. *

* If 'trapExit' is set for the actor to act as supervisor, then a faultHandler must be defined. + *

* Can be one of: - *

+   * 
    *  faultHandler = Some(AllForOneStrategy(maxNrOfRetries, withinTimeRange))
-   *
+   * 
+ * Or: + *
    *  faultHandler = Some(OneForOneStrategy(maxNrOfRetries, withinTimeRange))
    * 
*/ @@ -211,6 +294,11 @@ trait ActorRef extends TransactionManagement { protected[akka] def sender_=(s: Option[ActorRef]) = guard.withGuard { _sender = s } protected[akka] def senderFuture_=(sf: Option[CompletableFuture[Any]]) = guard.withGuard { _senderFuture = sf } + /** + * Returns the uuid for the actor. + */ + def uuid = _uuid + /** * The reference sender Actor of the last received message. * Is defined if the message was sent from another Actor, else None. @@ -221,7 +309,7 @@ trait ActorRef extends TransactionManagement { * The reference sender future of the last received message. * Is defined if the message was sent with sent with '!!' or '!!!', else None. */ - def senderFuture: Option[CompletableFuture[Any]] = guard.withGuard { _senderFuture } + def senderFuture: Option[CompletableFuture[Any]] = guard.withGuard { _senderFuture } /** * Is the actor being restarted? @@ -239,15 +327,24 @@ trait ActorRef extends TransactionManagement { def isShutdown: Boolean = _isShutDown /** - * Returns the uuid for the actor. - */ - def uuid = _uuid - - /** - * Tests if the actor is able to handle the message passed in as arguments. + * Is the actor able to handle the message passed in as arguments? */ def isDefinedAt(message: Any): Boolean = actor.base.isDefinedAt(message) + /** + * Is the actor is serializable? + */ + def isSerializable: Boolean = actor.isInstanceOf[SerializableActor] + + /** + * Returns the 'Serializer' instance for the Actor as an Option. + *

+ * It returns 'Some(serializer)' if the Actor is serializable and 'None' if not. + */ + def serializer: Option[Serializer] = + if (isSerializable) Some(actor.asInstanceOf[SerializableActor].serializer) + else None + /** * Only for internal use. UUID is effectively final. */ @@ -517,7 +614,9 @@ trait ActorRef extends TransactionManagement { */ def shutdownLinkedActors: Unit - protected[akka] def toProtobuf: ActorRefProtocol + protected[akka] def toRemoteActorRefProtocol: RemoteActorRefProtocol + + protected[akka] def toSerializedActorRefProtocol: SerializedActorRefProtocol protected[akka] def invoke(messageHandle: MessageInvocation): Unit @@ -562,22 +661,64 @@ trait ActorRef extends TransactionManagement { protected def processSender(senderOption: Option[ActorRef], requestBuilder: RemoteRequestProtocol.Builder) = { senderOption.foreach { sender => RemoteServer.getOrCreateServer(sender.homeAddress).register(sender.uuid, sender) - requestBuilder.setSender(sender.toProtobuf) + requestBuilder.setSender(sender.toRemoteActorRefProtocol) } } } /** - * Local ActorRef that is used when referencing the Actor on its "home" node. + * Local (serializable) ActorRef that is used when referencing the Actor on its "home" node. * * @author Jonas Bonér */ sealed class LocalActorRef private[akka]( private[this] var actorFactory: Either[Option[Class[_ <: Actor]], Option[() => Actor]] = Left(None)) extends ActorRef { + + private var isDeserialized = false + private var loader: Option[ClassLoader] = None private[akka] def this(clazz: Class[_ <: Actor]) = this(Left(Some(clazz))) private[akka] def this(factory: () => Actor) = this(Right(Some(factory))) + + // used only for deserialization + private[akka] def this(__uuid: String, + __id: String, + __actorClassName: String, + __actorBytes: Array[Byte], + __hostname: String, + __port: Int, + __isTransactor: Boolean, + __timeout: Long, + __lifeCycle: Option[LifeCycle], + __supervisor: Option[ActorRef], + __hotswap: Option[PartialFunction[Any, Unit]], + __loader: ClassLoader, + __serializer: Serializer) = { + this(() => { + val actorClass = __loader.loadClass(__actorClassName) + val actorInstance = actorClass.newInstance + if (actorInstance.isInstanceOf[ProtobufSerializableActor[_]]) { + val instance = actorInstance.asInstanceOf[ProtobufSerializableActor[_]] + instance.fromBinary(__actorBytes) + instance + } else __serializer.fromBinary(__actorBytes, Some(actorClass)).asInstanceOf[Actor] + }) + loader = Some(__loader) + isDeserialized = true + _uuid = __uuid + id = __id + homeAddress = (__hostname, __port) + isTransactor = __isTransactor + timeout = __timeout + lifeCycle = __lifeCycle + _supervisor = __supervisor + hotswap = __hotswap + actorSelfFields._1.set(actor, this) + actorSelfFields._2.set(actor, Some(this)) + actorSelfFields._3.set(actor, Some(this)) + ActorRegistry.register(this) + } // Only mutable for RemoteServer in order to maintain identity across nodes @volatile private[akka] var _remoteAddress: Option[InetSocketAddress] = None @@ -594,12 +735,12 @@ sealed class LocalActorRef private[akka]( // instance elegible for garbage collection private val actorSelfFields = findActorSelfField(actor.getClass) - if (runActorInitialization) initializeActorInstance + if (runActorInitialization && !isDeserialized) initializeActorInstance /** * Serializes the ActorRef instance into a Protocol Buffers (protobuf) Message. */ - protected[akka] def toProtobuf: ActorRefProtocol = guard.withGuard { + protected[akka] def toRemoteActorRefProtocol: RemoteActorRefProtocol = guard.withGuard { val host = homeAddress.getHostName val port = homeAddress.getPort @@ -609,16 +750,60 @@ sealed class LocalActorRef private[akka]( RemoteServer.registerActor(homeAddress, uuid, this) registeredInRemoteNodeDuringSerialization = true } - - ActorRefProtocol.newBuilder + + RemoteActorRefProtocol.newBuilder .setUuid(uuid) - .setActorClassName(actorClass.getName) - .setSourceHostname(host) - .setSourcePort(port) + .setActorClassname(actorClass.getName) + .setHomeAddress(AddressProtocol.newBuilder.setHostname(host).setPort(port).build) .setTimeout(timeout) .build } + protected[akka] def toSerializedActorRefProtocol: SerializedActorRefProtocol = guard.withGuard { + if (!isSerializable) throw new IllegalStateException( + "Can't serialize an ActorRef using SerializedActorRefProtocol\nthat is wrapping an Actor that is not mixing in the SerializableActor trait") + + val lifeCycleProtocol: Option[LifeCycleProtocol] = { + def setScope(builder: LifeCycleProtocol.Builder, scope: Scope) = scope match { + case Permanent => builder.setLifeCycle(LifeCycleType.PERMANENT) + case Temporary => builder.setLifeCycle(LifeCycleType.TEMPORARY) + } + val builder = LifeCycleProtocol.newBuilder + lifeCycle match { + case Some(LifeCycle(scope, None)) => + setScope(builder, scope) + Some(builder.build) + case Some(LifeCycle(scope, Some(callbacks))) => + setScope(builder, scope) + builder.setPreRestart(callbacks.preRestart) + builder.setPostRestart(callbacks.postRestart) + Some(builder.build) + case None => None + } + } + + val serializerClassname = serializer + .getOrElse(throw new IllegalStateException("Can't serialize Actor [" + toString + "] - no 'Serializer' defined")) + .getClass.getName + val originalAddress = AddressProtocol.newBuilder.setHostname(homeAddress.getHostName).setPort(homeAddress.getPort).build + + val builder = SerializedActorRefProtocol.newBuilder + .setUuid(uuid) + .setId(id) + .setActorClassname(actorClass.getName) + .setActorInstance(ByteString.copyFrom(actor.asInstanceOf[SerializableActor].toBinary)) + .setSerializerClassname(serializerClassname) + .setOriginalAddress(originalAddress) + .setIsTransactor(isTransactor) + .setTimeout(timeout) + + lifeCycleProtocol.foreach(builder.setLifeCycle(_)) + supervisor.foreach(sup => builder.setSupervisor(sup.toRemoteActorRefProtocol)) + // FIXME: how to serialize the hotswap PartialFunction ?? + // hotswap.foreach(builder.setHotswapStack(_)) + builder.build + } + /** * Returns the mailbox. */ @@ -627,8 +812,11 @@ sealed class LocalActorRef private[akka]( /** * Serializes the ActorRef instance into a byte array (Array[Byte]). */ - def toBinary: Array[Byte] = toProtobuf.toByteArray - + def toBinary: Array[Byte] = { + if (isSerializable) toSerializedActorRefProtocol.toByteArray + else toRemoteActorRefProtocol.toByteArray + } + /** * Returns the class for the Actor instance that is managed by the ActorRef. */ @@ -940,7 +1128,7 @@ sealed class LocalActorRef private[akka]( .setIsOneWay(false) .setIsEscaped(false) - //senderOption.foreach(sender => requestBuilder.setSender(sender.toProtobuf)) + //senderOption.foreach(sender => requestBuilder.setSender(sender.toRemoteActorRefProtocol)) RemoteProtocolBuilder.setMessage(message, requestBuilder) val id = registerSupervisorAsRemoteActor @@ -972,7 +1160,7 @@ sealed class LocalActorRef private[akka]( /** * Callback for the dispatcher. This is the ingle entry point to the user Actor implementation. */ - protected[akka] def invoke(messageHandle: MessageInvocation): Unit = actor.synchronized { + protected[akka] def invoke(messageHandle: MessageInvocation): Unit = actor.synchronized { if (isShutdown) { Actor.log.warning("Actor [%s] is shut down, ignoring message [%s]", toString, messageHandle) return @@ -1279,7 +1467,8 @@ private[akka] case class RemoteActorRef private[akka] ( def mailboxSize: Int = unsupported def supervisor: Option[ActorRef] = unsupported def shutdownLinkedActors: Unit = unsupported - protected[akka] def toProtobuf: ActorRefProtocol = unsupported + protected[akka] def toRemoteActorRefProtocol: RemoteActorRefProtocol = unsupported + protected[akka] def toSerializedActorRefProtocol: SerializedActorRefProtocol = unsupported protected[akka] def mailbox: Deque[MessageInvocation] = unsupported protected[akka] def restart(reason: Throwable): Unit = unsupported protected[akka] def handleTrapExit(dead: ActorRef, reason: Throwable): Unit = unsupported diff --git a/akka-core/src/main/scala/actor/Scheduler.scala b/akka-core/src/main/scala/actor/Scheduler.scala index 7bc9f6d48f..41d418c6e8 100644 --- a/akka-core/src/main/scala/actor/Scheduler.scala +++ b/akka-core/src/main/scala/actor/Scheduler.scala @@ -30,21 +30,22 @@ object Scheduler { private var service = Executors.newSingleThreadScheduledExecutor(SchedulerThreadFactory) private val schedulers = new ConcurrentHashMap[ActorRef, ActorRef] - def schedule(receiver: ActorRef, message: AnyRef, initialDelay: Long, delay: Long, timeUnit: TimeUnit) = { + def schedule(receiver: ActorRef, message: AnyRef, initialDelay: Long, delay: Long, timeUnit: TimeUnit): ActorRef = { try { val future = service.scheduleAtFixedRate( new Runnable { def run = receiver ! message }, initialDelay, delay, timeUnit).asInstanceOf[ScheduledFuture[AnyRef]] val scheduler = actorOf(new ScheduleActor(future)).start schedulers.put(scheduler, scheduler) + scheduler } catch { case e => throw SchedulerException(message + " could not be scheduled on " + receiver, e) } } - def unschedule(actorRef: ActorRef) = { - actorRef ! UnSchedule - schedulers.remove(actorRef) + def unschedule(scheduleActor: ActorRef) = { + scheduleActor ! UnSchedule + schedulers.remove(scheduleActor) } def shutdown = { @@ -78,6 +79,4 @@ private object SchedulerThreadFactory extends ThreadFactory { thread.setDaemon(true) thread } -} - - +} \ No newline at end of file diff --git a/akka-core/src/main/scala/dispatch/ExecutorBasedEventDrivenDispatcher.scala b/akka-core/src/main/scala/dispatch/ExecutorBasedEventDrivenDispatcher.scala index ccbb9edc94..9120e34bdf 100644 --- a/akka-core/src/main/scala/dispatch/ExecutorBasedEventDrivenDispatcher.scala +++ b/akka-core/src/main/scala/dispatch/ExecutorBasedEventDrivenDispatcher.scala @@ -86,8 +86,7 @@ class ExecutorBasedEventDrivenDispatcher(_name: String, throughput: Int = Dispat finishedBeforeMailboxEmpty = processMailbox(receiver) } finally { lock.unlock - if (finishedBeforeMailboxEmpty) - dispatch(receiver) + if (finishedBeforeMailboxEmpty) dispatch(receiver) } } } while ((lockAcquiredOnce && !finishedBeforeMailboxEmpty && !mailbox.isEmpty)) diff --git a/akka-core/src/main/scala/remote/Cluster.scala b/akka-core/src/main/scala/remote/Cluster.scala index 32380bec7d..4f2ece95fe 100644 --- a/akka-core/src/main/scala/remote/Cluster.scala +++ b/akka-core/src/main/scala/remote/Cluster.scala @@ -119,7 +119,7 @@ abstract class BasicClusterActor extends ClusterActor with Logging { case m: Message[ADDR_T] => { val (src, msg) = (m.sender, m.msg) - (serializer in (msg, None)) match { + (serializer fromBinary (msg, None)) match { case PapersPlease => { log debug ("Asked for papers by %s", src) @@ -169,7 +169,7 @@ abstract class BasicClusterActor extends ClusterActor with Logging { * that's been set in the akka-conf */ protected def broadcast[T <: AnyRef](recipients: Iterable[ADDR_T], msg: T): Unit = { - lazy val m = serializer out msg + lazy val m = serializer toBinary msg for (r <- recipients) toOneNode(r, m) } @@ -178,7 +178,7 @@ abstract class BasicClusterActor extends ClusterActor with Logging { * that's been set in the akka-conf */ protected def broadcast[T <: AnyRef](msg: T): Unit = - if (!remotes.isEmpty) toAllNodes(serializer out msg) + if (!remotes.isEmpty) toAllNodes(serializer toBinary msg) /** * Applies the given PartialFunction to all known RemoteAddresses diff --git a/akka-core/src/main/scala/remote/RemoteClient.scala b/akka-core/src/main/scala/remote/RemoteClient.scala index da0f9be72b..1f9c593485 100644 --- a/akka-core/src/main/scala/remote/RemoteClient.scala +++ b/akka-core/src/main/scala/remote/RemoteClient.scala @@ -4,7 +4,7 @@ package se.scalablesolutions.akka.remote -import se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.{RemoteRequestProtocol, RemoteReplyProtocol} +import se.scalablesolutions.akka.remote.protocol.RemoteProtocol._ import se.scalablesolutions.akka.actor.{Exit, Actor, ActorRef, RemoteActorRef} import se.scalablesolutions.akka.dispatch.{DefaultCompletableFuture, CompletableFuture} import se.scalablesolutions.akka.util.{UUID, Logging} @@ -359,12 +359,11 @@ class RemoteClientHandler(val name: String, event.getChannel.close } - private def parseException(reply: RemoteReplyProtocol) = { + private def parseException(reply: RemoteReplyProtocol): Throwable = { val exception = reply.getException - val exceptionType = Class.forName(exception.substring(0, exception.indexOf('$'))) - val exceptionMessage = exception.substring(exception.indexOf('$') + 1, exception.length) - exceptionType + val exceptionClass = Class.forName(exception.getClassname) + exceptionClass .getConstructor(Array[Class[_]](classOf[String]): _*) - .newInstance(exceptionMessage).asInstanceOf[Throwable] + .newInstance(exception.getMessage).asInstanceOf[Throwable] } } diff --git a/akka-core/src/main/scala/remote/RemoteProtocolBuilder.scala b/akka-core/src/main/scala/remote/RemoteProtocolBuilder.scala index ef2657901c..3cbd2a4741 100644 --- a/akka-core/src/main/scala/remote/RemoteProtocolBuilder.scala +++ b/akka-core/src/main/scala/remote/RemoteProtocolBuilder.scala @@ -4,18 +4,17 @@ package se.scalablesolutions.akka.remote -import se.scalablesolutions.akka.serialization.Serializable.SBinary -import se.scalablesolutions.akka.serialization.{Serializer, Serializable, SerializationProtocol} -import se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.{RemoteRequestProtocol, RemoteReplyProtocol} +import se.scalablesolutions.akka.serialization.{Serializer, Serializable} +import se.scalablesolutions.akka.remote.protocol.RemoteProtocol._ import com.google.protobuf.{Message, ByteString} object RemoteProtocolBuilder { - private var SERIALIZER_JAVA: Serializer.Java = Serializer.Java - private var SERIALIZER_JAVA_JSON: Serializer.JavaJSON = Serializer.JavaJSON + private var SERIALIZER_JAVA: Serializer.Java = Serializer.Java + private var SERIALIZER_JAVA_JSON: Serializer.JavaJSON = Serializer.JavaJSON private var SERIALIZER_SCALA_JSON: Serializer.ScalaJSON = Serializer.ScalaJSON - private var SERIALIZER_SBINARY: Serializer.SBinary = Serializer.SBinary - private var SERIALIZER_PROTOBUF: Serializer.Protobuf = Serializer.Protobuf + private var SERIALIZER_SBINARY: Serializer.SBinary = Serializer.SBinary + private var SERIALIZER_PROTOBUF: Serializer.Protobuf = Serializer.Protobuf def setClassLoader(cl: ClassLoader) = { SERIALIZER_JAVA.classLoader = Some(cl) @@ -25,102 +24,102 @@ object RemoteProtocolBuilder { } def getMessage(request: RemoteRequestProtocol): Any = { - request.getProtocol match { - case SerializationProtocol.JAVA => - unbox(SERIALIZER_JAVA.in(request.getMessage.toByteArray, None)) - case SerializationProtocol.SBINARY => + request.getSerializationScheme match { + case SerializationSchemeType.JAVA => + unbox(SERIALIZER_JAVA.fromBinary(request.getMessage.toByteArray, None)) + case SerializationSchemeType.SBINARY => val classToLoad = new String(request.getMessageManifest.toByteArray) val clazz = if (SERIALIZER_SBINARY.classLoader.isDefined) SERIALIZER_SBINARY.classLoader.get.loadClass(classToLoad) else Class.forName(classToLoad) - val renderer = clazz.newInstance.asInstanceOf[SBinary[_ <: AnyRef]] + val renderer = clazz.newInstance.asInstanceOf[Serializable.SBinary[_ <: AnyRef]] renderer.fromBytes(request.getMessage.toByteArray) - case SerializationProtocol.SCALA_JSON => - val manifest = SERIALIZER_JAVA.in(request.getMessageManifest.toByteArray, None).asInstanceOf[String] - SERIALIZER_SCALA_JSON.in(request.getMessage.toByteArray, Some(Class.forName(manifest))) - case SerializationProtocol.JAVA_JSON => - val manifest = SERIALIZER_JAVA.in(request.getMessageManifest.toByteArray, None).asInstanceOf[String] - SERIALIZER_JAVA_JSON.in(request.getMessage.toByteArray, Some(Class.forName(manifest))) - case SerializationProtocol.PROTOBUF => - val messageClass = SERIALIZER_JAVA.in(request.getMessageManifest.toByteArray, None).asInstanceOf[Class[_]] - SERIALIZER_PROTOBUF.in(request.getMessage.toByteArray, Some(messageClass)) + case SerializationSchemeType.SCALA_JSON => + val manifest = SERIALIZER_JAVA.fromBinary(request.getMessageManifest.toByteArray, None).asInstanceOf[String] + SERIALIZER_SCALA_JSON.fromBinary(request.getMessage.toByteArray, Some(Class.forName(manifest))) + case SerializationSchemeType.JAVA_JSON => + val manifest = SERIALIZER_JAVA.fromBinary(request.getMessageManifest.toByteArray, None).asInstanceOf[String] + SERIALIZER_JAVA_JSON.fromBinary(request.getMessage.toByteArray, Some(Class.forName(manifest))) + case SerializationSchemeType.PROTOBUF => + val messageClass = SERIALIZER_JAVA.fromBinary(request.getMessageManifest.toByteArray, None).asInstanceOf[Class[_]] + SERIALIZER_PROTOBUF.fromBinary(request.getMessage.toByteArray, Some(messageClass)) } } def getMessage(reply: RemoteReplyProtocol): Any = { - reply.getProtocol match { - case SerializationProtocol.JAVA => - unbox(SERIALIZER_JAVA.in(reply.getMessage.toByteArray, None)) - case SerializationProtocol.SBINARY => + reply.getSerializationScheme match { + case SerializationSchemeType.JAVA => + unbox(SERIALIZER_JAVA.fromBinary(reply.getMessage.toByteArray, None)) + case SerializationSchemeType.SBINARY => val classToLoad = new String(reply.getMessageManifest.toByteArray) val clazz = if (SERIALIZER_SBINARY.classLoader.isDefined) SERIALIZER_SBINARY.classLoader.get.loadClass(classToLoad) else Class.forName(classToLoad) - val renderer = clazz.newInstance.asInstanceOf[SBinary[_ <: AnyRef]] + val renderer = clazz.newInstance.asInstanceOf[Serializable.SBinary[_ <: AnyRef]] renderer.fromBytes(reply.getMessage.toByteArray) - case SerializationProtocol.SCALA_JSON => - val manifest = SERIALIZER_JAVA.in(reply.getMessageManifest.toByteArray, None).asInstanceOf[String] - SERIALIZER_SCALA_JSON.in(reply.getMessage.toByteArray, Some(Class.forName(manifest))) - case SerializationProtocol.JAVA_JSON => - val manifest = SERIALIZER_JAVA.in(reply.getMessageManifest.toByteArray, None).asInstanceOf[String] - SERIALIZER_JAVA_JSON.in(reply.getMessage.toByteArray, Some(Class.forName(manifest))) - case SerializationProtocol.PROTOBUF => - val messageClass = SERIALIZER_JAVA.in(reply.getMessageManifest.toByteArray, None).asInstanceOf[Class[_]] - SERIALIZER_PROTOBUF.in(reply.getMessage.toByteArray, Some(messageClass)) + case SerializationSchemeType.SCALA_JSON => + val manifest = SERIALIZER_JAVA.fromBinary(reply.getMessageManifest.toByteArray, None).asInstanceOf[String] + SERIALIZER_SCALA_JSON.fromBinary(reply.getMessage.toByteArray, Some(Class.forName(manifest))) + case SerializationSchemeType.JAVA_JSON => + val manifest = SERIALIZER_JAVA.fromBinary(reply.getMessageManifest.toByteArray, None).asInstanceOf[String] + SERIALIZER_JAVA_JSON.fromBinary(reply.getMessage.toByteArray, Some(Class.forName(manifest))) + case SerializationSchemeType.PROTOBUF => + val messageClass = SERIALIZER_JAVA.fromBinary(reply.getMessageManifest.toByteArray, None).asInstanceOf[Class[_]] + SERIALIZER_PROTOBUF.fromBinary(reply.getMessage.toByteArray, Some(messageClass)) } } def setMessage(message: Any, builder: RemoteRequestProtocol.Builder) = { if (message.isInstanceOf[Serializable.SBinary[_]]) { val serializable = message.asInstanceOf[Serializable.SBinary[_ <: Any]] - builder.setProtocol(SerializationProtocol.SBINARY) + builder.setSerializationScheme(SerializationSchemeType.SBINARY) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else if (message.isInstanceOf[Message]) { val serializable = message.asInstanceOf[Message] - builder.setProtocol(SerializationProtocol.PROTOBUF) + builder.setSerializationScheme(SerializationSchemeType.PROTOBUF) builder.setMessage(ByteString.copyFrom(serializable.toByteArray)) - builder.setMessageManifest(ByteString.copyFrom(SERIALIZER_JAVA.out(serializable.getClass))) + builder.setMessageManifest(ByteString.copyFrom(SERIALIZER_JAVA.toBinary(serializable.getClass))) } else if (message.isInstanceOf[Serializable.ScalaJSON]) { val serializable = message.asInstanceOf[Serializable.ScalaJSON] - builder.setProtocol(SerializationProtocol.SCALA_JSON) + builder.setSerializationScheme(SerializationSchemeType.SCALA_JSON) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else if (message.isInstanceOf[Serializable.JavaJSON]) { val serializable = message.asInstanceOf[Serializable.JavaJSON] - builder.setProtocol(SerializationProtocol.JAVA_JSON) + builder.setSerializationScheme(SerializationSchemeType.JAVA_JSON) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else { // default, e.g. if no protocol used explicitly then use Java serialization - builder.setProtocol(SerializationProtocol.JAVA) - builder.setMessage(ByteString.copyFrom(SERIALIZER_JAVA.out(box(message)))) + builder.setSerializationScheme(SerializationSchemeType.JAVA) + builder.setMessage(ByteString.copyFrom(SERIALIZER_JAVA.toBinary(box(message)))) } } def setMessage(message: Any, builder: RemoteReplyProtocol.Builder) = { if (message.isInstanceOf[Serializable.SBinary[_]]) { val serializable = message.asInstanceOf[Serializable.SBinary[_ <: Any]] - builder.setProtocol(SerializationProtocol.SBINARY) + builder.setSerializationScheme(SerializationSchemeType.SBINARY) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else if (message.isInstanceOf[Message]) { val serializable = message.asInstanceOf[Message] - builder.setProtocol(SerializationProtocol.PROTOBUF) + builder.setSerializationScheme(SerializationSchemeType.PROTOBUF) builder.setMessage(ByteString.copyFrom(serializable.toByteArray)) - builder.setMessageManifest(ByteString.copyFrom(SERIALIZER_JAVA.out(serializable.getClass))) + builder.setMessageManifest(ByteString.copyFrom(SERIALIZER_JAVA.toBinary(serializable.getClass))) } else if (message.isInstanceOf[Serializable.ScalaJSON]) { val serializable = message.asInstanceOf[Serializable.ScalaJSON] - builder.setProtocol(SerializationProtocol.SCALA_JSON) + builder.setSerializationScheme(SerializationSchemeType.SCALA_JSON) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else if (message.isInstanceOf[Serializable.JavaJSON]) { val serializable = message.asInstanceOf[Serializable.JavaJSON] - builder.setProtocol(SerializationProtocol.JAVA_JSON) + builder.setSerializationScheme(SerializationSchemeType.JAVA_JSON) builder.setMessage(ByteString.copyFrom(serializable.toBytes)) builder.setMessageManifest(ByteString.copyFrom(serializable.getClass.getName.getBytes)) } else { // default, e.g. if no protocol used explicitly then use Java serialization - builder.setProtocol(SerializationProtocol.JAVA) - builder.setMessage(ByteString.copyFrom(SERIALIZER_JAVA.out(box(message)))) + builder.setSerializationScheme(SerializationSchemeType.JAVA) + builder.setMessage(ByteString.copyFrom(SERIALIZER_JAVA.toBinary(box(message)))) } } diff --git a/akka-core/src/main/scala/remote/RemoteServer.scala b/akka-core/src/main/scala/remote/RemoteServer.scala index c374d98863..0749132ce2 100644 --- a/akka-core/src/main/scala/remote/RemoteServer.scala +++ b/akka-core/src/main/scala/remote/RemoteServer.scala @@ -12,7 +12,7 @@ import java.util.{Map => JMap} import se.scalablesolutions.akka.actor._ import se.scalablesolutions.akka.util._ import se.scalablesolutions.akka.util.Helpers.narrow -import se.scalablesolutions.akka.remote.protobuf.RemoteProtocol._ +import se.scalablesolutions.akka.remote.protocol.RemoteProtocol._ import se.scalablesolutions.akka.config.Config.config import org.jboss.netty.bootstrap.ServerBootstrap @@ -324,9 +324,8 @@ class RemoteServerHandler( applicationLoader.foreach(RemoteProtocolBuilder.setClassLoader(_)) /** - * ChannelOpen overridden to store open channels for a clean shutdown - * of a RemoteServer. If a channel is closed before, it is - * automatically removed from the open channels group. + * ChannelOpen overridden to store open channels for a clean shutdown of a RemoteServer. + * If a channel is closed before, it is automatically removed from the open channels group. */ override def channelOpen(ctx: ChannelHandlerContext, event: ChannelStateEvent) { openChannels.add(ctx.getChannel) @@ -365,8 +364,9 @@ class RemoteServerHandler( val actorRef = createActor(request.getTarget, request.getUuid, request.getTimeout) actorRef.start val message = RemoteProtocolBuilder.getMessage(request) - val sender = if (request.hasSender) Some(ActorRef.fromProtobuf(request.getSender, applicationLoader)) - else None + val sender = + if (request.hasSender) Some(ActorRef.fromProtobufToRemoteActorRef(request.getSender, applicationLoader)) + else None if (request.getIsOneWay) actorRef.!(message)(sender) else { try { @@ -386,7 +386,7 @@ class RemoteServerHandler( log.error(e, "Could not invoke remote actor [%s]", request.getTarget) val replyBuilder = RemoteReplyProtocol.newBuilder .setId(request.getId) - .setException(e.getClass.getName + "$" + e.getMessage) + .setException(ExceptionProtocol.newBuilder.setClassname(e.getClass.getName).setMessage(e.getMessage).build) .setIsSuccessful(false) .setIsActor(true) if (request.hasSupervisorUuid) replyBuilder.setSupervisorUuid(request.getSupervisorUuid) @@ -404,7 +404,6 @@ class RemoteServerHandler( val argClasses = args.map(_.getClass) val (unescapedArgs, unescapedArgClasses) = unescapeArgs(args, argClasses, request.getTimeout) - //continueTransaction(request) try { val messageReceiver = activeObject.getClass.getDeclaredMethod( request.getMethod, unescapedArgClasses: _*) @@ -426,7 +425,7 @@ class RemoteServerHandler( log.error(e.getCause, "Could not invoke remote active object [%s :: %s]", request.getMethod, request.getTarget) val replyBuilder = RemoteReplyProtocol.newBuilder .setId(request.getId) - .setException(e.getCause.getClass.getName + "$" + e.getCause.getMessage) + .setException(ExceptionProtocol.newBuilder.setClassname(e.getClass.getName).setMessage(e.getMessage).build) .setIsSuccessful(false) .setIsActor(false) if (request.hasSupervisorUuid) replyBuilder.setSupervisorUuid(request.getSupervisorUuid) @@ -436,7 +435,7 @@ class RemoteServerHandler( log.error(e.getCause, "Could not invoke remote active object [%s :: %s]", request.getMethod, request.getTarget) val replyBuilder = RemoteReplyProtocol.newBuilder .setId(request.getId) - .setException(e.getClass.getName + "$" + e.getMessage) + .setException(ExceptionProtocol.newBuilder.setClassname(e.getClass.getName).setMessage(e.getMessage).build) .setIsSuccessful(false) .setIsActor(false) if (request.hasSupervisorUuid) replyBuilder.setSupervisorUuid(request.getSupervisorUuid) diff --git a/akka-core/src/main/scala/serialization/Serializable.scala b/akka-core/src/main/scala/serialization/Serializable.scala index abe1295e4b..216869d7a6 100644 --- a/akka-core/src/main/scala/serialization/Serializable.scala +++ b/akka-core/src/main/scala/serialization/Serializable.scala @@ -15,14 +15,6 @@ import java.io.{StringWriter, ByteArrayOutputStream, ObjectOutputStream} import sjson.json.{Serializer=>SJSONSerializer} -object SerializationProtocol { - val JAVA = 0 - val SBINARY = 1 - val SCALA_JSON = 2 - val JAVA_JSON = 3 - val PROTOBUF = 4 -} - /** * @author Jonas Bonér */ diff --git a/akka-core/src/main/scala/serialization/Serializer.scala b/akka-core/src/main/scala/serialization/Serializer.scala index 7298e63fc6..79be0bec8b 100644 --- a/akka-core/src/main/scala/serialization/Serializer.scala +++ b/akka-core/src/main/scala/serialization/Serializer.scala @@ -19,12 +19,10 @@ import sjson.json.{Serializer => SJSONSerializer} */ trait Serializer { var classLoader: Option[ClassLoader] = None + def deepClone(obj: AnyRef): AnyRef = fromBinary(toBinary(obj), Some(obj.getClass)) - def deepClone(obj: AnyRef): AnyRef - - def out(obj: AnyRef): Array[Byte] - - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef + def toBinary(obj: AnyRef): Array[Byte] + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef } // For Java API @@ -46,9 +44,8 @@ object Serializer { object NOOP extends NOOP class NOOP extends Serializer { - def deepClone(obj: AnyRef): AnyRef = obj - def out(obj: AnyRef): Array[Byte] = obj.asInstanceOf[Array[Byte]] - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = bytes + def toBinary(obj: AnyRef): Array[Byte] = Array[Byte]() + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = null.asInstanceOf[AnyRef] } /** @@ -56,9 +53,7 @@ object Serializer { */ object Java extends Java trait Java extends Serializer { - def deepClone(obj: AnyRef): AnyRef = in(out(obj), None) - - def out(obj: AnyRef): Array[Byte] = { + def toBinary(obj: AnyRef): Array[Byte] = { val bos = new ByteArrayOutputStream val out = new ObjectOutputStream(bos) out.writeObject(obj) @@ -66,7 +61,7 @@ object Serializer { bos.toByteArray } - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { val in = if (classLoader.isDefined) new ClassLoaderObjectInputStream(classLoader.get, new ByteArrayInputStream(bytes)) else new ObjectInputStream(new ByteArrayInputStream(bytes)) @@ -81,15 +76,13 @@ object Serializer { */ object Protobuf extends Protobuf trait Protobuf extends Serializer { - def deepClone(obj: AnyRef): AnyRef = in(out(obj), Some(obj.getClass)) - - def out(obj: AnyRef): Array[Byte] = { + def toBinary(obj: AnyRef): Array[Byte] = { if (!obj.isInstanceOf[Message]) throw new IllegalArgumentException( "Can't serialize a non-protobuf message using protobuf [" + obj + "]") obj.asInstanceOf[Message].toByteArray } - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { if (!clazz.isDefined) throw new IllegalArgumentException( "Need a protobuf message class to be able to serialize bytes using protobuf") // TODO: should we cache this method lookup? @@ -98,9 +91,9 @@ object Serializer { message.toBuilder().mergeFrom(bytes).build } - def in(bytes: Array[Byte], clazz: Class[_]): AnyRef = { + def fromBinary(bytes: Array[Byte], clazz: Class[_]): AnyRef = { if (clazz eq null) throw new IllegalArgumentException("Protobuf message can't be null") - in(bytes, Some(clazz)) + fromBinary(bytes, Some(clazz)) } } @@ -111,9 +104,7 @@ object Serializer { trait JavaJSON extends Serializer { private val mapper = new ObjectMapper - def deepClone(obj: AnyRef): AnyRef = in(out(obj), Some(obj.getClass)) - - def out(obj: AnyRef): Array[Byte] = { + def toBinary(obj: AnyRef): Array[Byte] = { val bos = new ByteArrayOutputStream val out = new ObjectOutputStream(bos) mapper.writeValue(out, obj) @@ -121,7 +112,7 @@ object Serializer { bos.toByteArray } - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = { if (!clazz.isDefined) throw new IllegalArgumentException( "Can't deserialize JSON to instance if no class is provided") val in = @@ -132,7 +123,7 @@ object Serializer { obj } - def in(json: String, clazz: Class[_]): AnyRef = { + def fromJSON(json: String, clazz: Class[_]): AnyRef = { if (clazz eq null) throw new IllegalArgumentException("Can't deserialize JSON to instance if no class is provided") mapper.readValue(json, clazz).asInstanceOf[AnyRef] } @@ -143,19 +134,17 @@ object Serializer { */ object ScalaJSON extends ScalaJSON trait ScalaJSON extends Serializer { - def deepClone(obj: AnyRef): AnyRef = in(out(obj), None) - - def out(obj: AnyRef): Array[Byte] = SJSONSerializer.SJSON.out(obj) + def toBinary(obj: AnyRef): Array[Byte] = SJSONSerializer.SJSON.out(obj) // FIXME set ClassLoader on SJSONSerializer.SJSON - def in(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = SJSONSerializer.SJSON.in(bytes) + def fromBinary(bytes: Array[Byte], clazz: Option[Class[_]]): AnyRef = SJSONSerializer.SJSON.in(bytes) import scala.reflect.Manifest - def in[T](json: String)(implicit m: Manifest[T]): AnyRef = { + def fromJSON[T](json: String)(implicit m: Manifest[T]): AnyRef = { SJSONSerializer.SJSON.in(json)(m) } - def in[T](bytes: Array[Byte])(implicit m: Manifest[T]): AnyRef = { + def fromBinary[T](bytes: Array[Byte])(implicit m: Manifest[T]): AnyRef = { SJSONSerializer.SJSON.in(bytes)(m) } } @@ -171,11 +160,11 @@ object Serializer { var classLoader: Option[ClassLoader] = None - def deepClone[T <: AnyRef](obj: T)(implicit w : Writes[T], r : Reads[T]): T = in[T](out[T](obj), None) + def deepClone[T <: AnyRef](obj: T)(implicit w : Writes[T], r : Reads[T]): T = fromBinary[T](toBinary[T](obj), None) - def out[T](t : T)(implicit bin : Writes[T]): Array[Byte] = toByteArray[T](t) + def toBinary[T](t : T)(implicit bin : Writes[T]): Array[Byte] = toByteArray[T](t) - def in[T](array : Array[Byte], clazz: Option[Class[T]])(implicit bin : Reads[T]): T = fromByteArray[T](array) + def fromBinary[T](array : Array[Byte], clazz: Option[Class[T]])(implicit bin : Reads[T]): T = fromByteArray[T](array) } } diff --git a/akka-core/src/main/scala/util/Logging.scala b/akka-core/src/main/scala/util/Logging.scala index fc68e27178..8c6ea0fb99 100644 --- a/akka-core/src/main/scala/util/Logging.scala +++ b/akka-core/src/main/scala/util/Logging.scala @@ -17,7 +17,7 @@ import java.net.UnknownHostException * @author Jonas Bonér */ trait Logging { - @transient lazy val log = Logger.get(this.getClass.getName) + @sjson.json.JSONProperty(ignore = true) @transient lazy val log = Logger.get(this.getClass.getName) } /** diff --git a/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java b/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java index 0f9455e13c..8d9ab752ee 100644 --- a/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java +++ b/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java @@ -376,11 +376,301 @@ public final class ProtobufProtocol { // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.actor.ProtobufPOJO) } + public static final class Counter extends + com.google.protobuf.GeneratedMessage { + // Use Counter.newBuilder() to construct. + private Counter() { + initFields(); + } + private Counter(boolean noInit) {} + + private static final Counter defaultInstance; + public static Counter getDefaultInstance() { + return defaultInstance; + } + + public Counter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return se.scalablesolutions.akka.actor.ProtobufProtocol.internal_static_se_scalablesolutions_akka_actor_Counter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return se.scalablesolutions.akka.actor.ProtobufProtocol.internal_static_se_scalablesolutions_akka_actor_Counter_fieldAccessorTable; + } + + // required uint32 count = 1; + public static final int COUNT_FIELD_NUMBER = 1; + private boolean hasCount; + private int count_ = 0; + public boolean hasCount() { return hasCount; } + public int getCount() { return count_; } + + private void initFields() { + } + public final boolean isInitialized() { + if (!hasCount) return false; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (hasCount()) { + output.writeUInt32(1, getCount()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (hasCount()) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, getCount()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static se.scalablesolutions.akka.actor.ProtobufProtocol.Counter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(se.scalablesolutions.akka.actor.ProtobufProtocol.Counter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder { + private se.scalablesolutions.akka.actor.ProtobufProtocol.Counter result; + + // Construct using se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.newBuilder() + private Builder() {} + + private static Builder create() { + Builder builder = new Builder(); + builder.result = new se.scalablesolutions.akka.actor.ProtobufProtocol.Counter(); + return builder; + } + + protected se.scalablesolutions.akka.actor.ProtobufProtocol.Counter internalGetResult() { + return result; + } + + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new se.scalablesolutions.akka.actor.ProtobufProtocol.Counter(); + return this; + } + + public Builder clone() { + return create().mergeFrom(result); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.getDescriptor(); + } + + public se.scalablesolutions.akka.actor.ProtobufProtocol.Counter getDefaultInstanceForType() { + return se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.getDefaultInstance(); + } + + public boolean isInitialized() { + return result.isInitialized(); + } + public se.scalablesolutions.akka.actor.ProtobufProtocol.Counter build() { + if (result != null && !isInitialized()) { + throw newUninitializedMessageException(result); + } + return buildPartial(); + } + + private se.scalablesolutions.akka.actor.ProtobufProtocol.Counter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + if (!isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return buildPartial(); + } + + public se.scalablesolutions.akka.actor.ProtobufProtocol.Counter buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); + } + se.scalablesolutions.akka.actor.ProtobufProtocol.Counter returnMe = result; + result = null; + return returnMe; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof se.scalablesolutions.akka.actor.ProtobufProtocol.Counter) { + return mergeFrom((se.scalablesolutions.akka.actor.ProtobufProtocol.Counter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(se.scalablesolutions.akka.actor.ProtobufProtocol.Counter other) { + if (other == se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.getDefaultInstance()) return this; + if (other.hasCount()) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite 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: { + setCount(input.readUInt32()); + break; + } + } + } + } + + + // required uint32 count = 1; + public boolean hasCount() { + return result.hasCount(); + } + public int getCount() { + return result.getCount(); + } + public Builder setCount(int value) { + result.hasCount = true; + result.count_ = value; + return this; + } + public Builder clearCount() { + result.hasCount = false; + result.count_ = 0; + return this; + } + + // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.actor.Counter) + } + + static { + defaultInstance = new Counter(true); + se.scalablesolutions.akka.actor.ProtobufProtocol.internalForceInit(); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.actor.Counter) + } + private static com.google.protobuf.Descriptors.Descriptor internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_se_scalablesolutions_akka_actor_Counter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_se_scalablesolutions_akka_actor_Counter_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -392,7 +682,8 @@ public final class ProtobufProtocol { java.lang.String[] descriptorData = { "\n\026ProtobufProtocol.proto\022\037se.scalablesol" + "utions.akka.actor\"8\n\014ProtobufPOJO\022\n\n\002id\030" + - "\001 \002(\004\022\014\n\004name\030\002 \002(\t\022\016\n\006status\030\003 \002(\010" + "\001 \002(\004\022\014\n\004name\030\002 \002(\t\022\016\n\006status\030\003 \002(\010\"\030\n\007C" + + "ounter\022\r\n\005count\030\001 \002(\r" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -407,6 +698,14 @@ public final class ProtobufProtocol { new java.lang.String[] { "Id", "Name", "Status", }, se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.class, se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.Builder.class); + internal_static_se_scalablesolutions_akka_actor_Counter_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_se_scalablesolutions_akka_actor_Counter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_se_scalablesolutions_akka_actor_Counter_descriptor, + new java.lang.String[] { "Count", }, + se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.class, + se.scalablesolutions.akka.actor.ProtobufProtocol.Counter.Builder.class); return null; } }; diff --git a/akka-core/src/test/java/ProtobufProtocol.proto b/akka-core/src/test/protocol/ProtobufProtocol.proto similarity index 65% rename from akka-core/src/test/java/ProtobufProtocol.proto rename to akka-core/src/test/protocol/ProtobufProtocol.proto index f4b146506c..17e5357750 100644 --- a/akka-core/src/test/java/ProtobufProtocol.proto +++ b/akka-core/src/test/protocol/ProtobufProtocol.proto @@ -6,8 +6,8 @@ package se.scalablesolutions.akka.actor; /* Compile with: - cd ./akka-core/src/test/java - protoc ProtobufProtocol.proto --java_out . + cd ./akka-core/src/test/protocol + protoc ProtobufProtocol.proto --java_out ../java */ message ProtobufPOJO { @@ -15,3 +15,7 @@ message ProtobufPOJO { required string name = 2; required bool status = 3; } + +message Counter { + required uint32 count = 1; +} diff --git a/akka-core/src/test/scala/SerializableActorSpec.scala b/akka-core/src/test/scala/SerializableActorSpec.scala new file mode 100644 index 0000000000..a743a5eb0b --- /dev/null +++ b/akka-core/src/test/scala/SerializableActorSpec.scala @@ -0,0 +1,115 @@ +package se.scalablesolutions.akka.actor + +import Actor._ + +import org.scalatest.Spec +import org.scalatest.Assertions +import org.scalatest.matchers.ShouldMatchers +import org.scalatest.BeforeAndAfterAll +import org.scalatest.junit.JUnitRunner +import org.junit.runner.RunWith + +import com.google.protobuf.Message + +@RunWith(classOf[JUnitRunner]) +class SerializableActorSpec extends + Spec with + ShouldMatchers with + BeforeAndAfterAll { + + describe("SerializableActor") { + it("should be able to serialize and deserialize a JavaSerializableActor") { + val actor1 = actorOf[JavaSerializableTestActor].start + val serializer = actor1.serializer.getOrElse(fail("Serializer not defined")) + (actor1 !! "hello").getOrElse("_") should equal("world 1") + + val bytes = actor1.toBinary + val actor2 = ActorRef.fromBinaryToLocalActorRef(bytes) + + actor2.start + (actor2 !! "hello").getOrElse("_") should equal("world 2") + } + + it("should be able to serialize and deserialize a ProtobufSerializableActor") { + val actor1 = actorOf[ProtobufSerializableTestActor].start + val serializer = actor1.serializer.getOrElse(fail("Serializer not defined")) + (actor1 !! "hello").getOrElse("_") should equal("world 1") + (actor1 !! "hello").getOrElse("_") should equal("world 2") + + val bytes = actor1.toBinary + val actor2 = ActorRef.fromBinaryToLocalActorRef(bytes) + + actor2.start + (actor2 !! "hello").getOrElse("_") should equal("world 3") + } + + +/* + it("should be able to serialize and deserialize a JavaJSONSerializableActor") { + val actor1 = actorOf[JavaJSONSerializableTestActor].start + val serializer = actor1.serializer.getOrElse(fail("Serializer not defined")) + (actor1 !! "hello").getOrElse("_") should equal("world 1") + (actor1 !! "hello").getOrElse("_") should equal("world 2") + + val bytes = actor1.toBinary + val actor2 = ActorRef.fromBinaryToLocalActorRef(bytes) + + actor2.start + (actor2 !! "hello").getOrElse("_") should equal("world 3") + } + + it("should be able to serialize and deserialize a ScalaJSONSerializableActor") { + val actor1 = actorOf[ScalaJSONSerializableTestActor].start + val serializer = actor1.serializer.getOrElse(fail("Serializer not defined")) + (actor1 !! "hello").getOrElse("_") should equal("world 1") + + val bytes = actor1.toBinary + val actor2 = ActorRef.fromBinaryToLocalActorRef(bytes) + + actor2.start + (actor2 !! "hello").getOrElse("_") should equal("world 2") + } +*/ + } +} + +@serializable class JavaSerializableTestActor extends JavaSerializableActor { + private var count = 0 + def receive = { + case "hello" => + count = count + 1 + self.reply("world " + count) + } +} + +class ProtobufSerializableTestActor extends ProtobufSerializableActor[ProtobufProtocol.Counter] { + val clazz = classOf[ProtobufProtocol.Counter] + private var count = 0 + + def toProtobuf = ProtobufProtocol.Counter.newBuilder.setCount(count).build + def fromProtobuf(message: ProtobufProtocol.Counter) = count = message.getCount + + def receive = { + case "hello" => + count = count + 1 + self.reply("world " + count) + } +} + +class JavaJSONSerializableTestActor extends JavaJSONSerializableActor { + private var count = 0 + def receive = { + case "hello" => + count = count + 1 + self.reply("world " + count) + } +} + +@scala.reflect.BeanInfo class ScalaJSONSerializableTestActor extends ScalaJSONSerializableActor { + private var count = 0 + def receive = { + case "hello" => + count = count + 1 + self.reply("world " + count) + } +} \ No newline at end of file diff --git a/akka-core/src/test/scala/SerializerSpec.scala b/akka-core/src/test/scala/SerializerSpec.scala index 0efc05192c..95b291ed9d 100644 --- a/akka-core/src/test/scala/SerializerSpec.scala +++ b/akka-core/src/test/scala/SerializerSpec.scala @@ -22,20 +22,20 @@ class SerializerSpec extends JUnitSuite { @Test def shouldSerializeString = { val f = Foo("debasish") - val json = Serializer.ScalaJSON.out(f) + val json = Serializer.ScalaJSON.toBinary(f) assert(new String(json) == """{"foo":"debasish"}""") - val fo = Serializer.ScalaJSON.in[Foo](new String(json)).asInstanceOf[Foo] + val fo = Serializer.ScalaJSON.fromJSON[Foo](new String(json)).asInstanceOf[Foo] assert(fo == f) } @Test def shouldSerializeTuple2 = { val message = MyMessage("id", ("hello", 34)) - val json = Serializer.ScalaJSON.out(message) + val json = Serializer.ScalaJSON.toBinary(message) assert(new String(json) == """{"id":"id","value":{"hello":34}}""") - val f = Serializer.ScalaJSON.in[MyMessage](new String(json)).asInstanceOf[MyMessage] + val f = Serializer.ScalaJSON.fromJSON[MyMessage](new String(json)).asInstanceOf[MyMessage] assert(f == message) - val g = Serializer.ScalaJSON.in[MyMessage](json).asInstanceOf[MyMessage] + val g = Serializer.ScalaJSON.fromBinary[MyMessage](json).asInstanceOf[MyMessage] assert(f == message) } } diff --git a/akka-core/src/test/scala/StmSpec.scala b/akka-core/src/test/scala/StmSpec.scala index 5a4459513c..177c6dfe4e 100644 --- a/akka-core/src/test/scala/StmSpec.scala +++ b/akka-core/src/test/scala/StmSpec.scala @@ -104,7 +104,7 @@ class StmSpec extends } describe("Transactor") { - it("should be able receive message sent with !! and pass it along to nested transactor with !! and receive reply; multipse times in a row") { + it("should be able receive message sent with !! and pass it along to nested transactor with !! and receive reply; multiple times in a row") { import GlobalTransactionVectorTestActor._ try { val actor = actorOf[NestedTransactorLevelOneActor].start diff --git a/akka-http/src/main/scala/ListWriter.scala b/akka-http/src/main/scala/ListWriter.scala index e95ed602c9..2a653ae90b 100644 --- a/akka-http/src/main/scala/ListWriter.scala +++ b/akka-http/src/main/scala/ListWriter.scala @@ -10,17 +10,24 @@ import javax.ws.rs.ext.{MessageBodyWriter, Provider} import javax.ws.rs.Produces /** - * writes Lists of JSON serializable objects + * Writes Lists of JSON serializable objects. */ @Provider @Produces(Array("application/json")) class ListWriter extends MessageBodyWriter[List[_]] { - def isWriteable(aClass: Class[_], aType: java.lang.reflect.Type, annotations: Array[java.lang.annotation.Annotation], mediaType: MediaType) = { + def isWriteable(aClass: Class[_], + aType: java.lang.reflect.Type, + annotations: Array[java.lang.annotation.Annotation], + mediaType: MediaType) = classOf[List[_]].isAssignableFrom(aClass) || aClass == ::.getClass - } - def getSize(list: List[_], aClass: Class[_], aType: java.lang.reflect.Type, annotations: Array[java.lang.annotation.Annotation], mediaType: MediaType) = -1L + def getSize(list: List[_], + aClass: Class[_], + aType: java.lang.reflect.Type, + annotations: Array[java.lang.annotation.Annotation], + mediaType: MediaType) = + -1L def writeTo(list: List[_], aClass: Class[_], @@ -28,11 +35,7 @@ class ListWriter extends MessageBodyWriter[List[_]] { annotations: Array[java.lang.annotation.Annotation], mediaType: MediaType, stringObjectMultivaluedMap: MultivaluedMap[String, Object], - outputStream: OutputStream) : Unit = { - if (list.isEmpty) - outputStream.write(" ".getBytes) - else - outputStream.write(Serializer.ScalaJSON.out(list)) - } - + outputStream: OutputStream): Unit = + if (list.isEmpty) outputStream.write(" ".getBytes) + else outputStream.write(Serializer.ScalaJSON.toBinary(list)) } diff --git a/akka-persistence/akka-persistence-cassandra/src/test/scala/CassandraPersistentActorSpec.scala b/akka-persistence/akka-persistence-cassandra/src/test/scala/CassandraPersistentActorSpec.scala index 648dec2be3..97419f3231 100644 --- a/akka-persistence/akka-persistence-cassandra/src/test/scala/CassandraPersistentActorSpec.scala +++ b/akka-persistence/akka-persistence-cassandra/src/test/scala/CassandraPersistentActorSpec.scala @@ -150,7 +150,7 @@ class CassandraPersistentActorSpec extends JUnitSuite { } /* import org.apache.cassandra.service.CassandraDaemon -object EmbeddedCassandraService { +object // EmbeddedCassandraService { System.setProperty("storage-config", "src/test/resources"); diff --git a/akka-samples/akka-sample-rest-scala/src/main/scala/SimpleService.scala b/akka-samples/akka-sample-rest-scala/src/main/scala/SimpleService.scala index 657a6ba217..90e208d7e1 100644 --- a/akka-samples/akka-sample-rest-scala/src/main/scala/SimpleService.scala +++ b/akka-samples/akka-sample-rest-scala/src/main/scala/SimpleService.scala @@ -67,12 +67,11 @@ class SimpleServiceActor extends Transactor { def receive = { case "Tick" => if (hasStartedTicking) { - val bytes = storage.get(KEY.getBytes).get - val counter = Integer.parseInt(new String(bytes, "UTF8")) - storage.put(KEY.getBytes, (counter + 1).toString.getBytes ) + val counter = storage.get(KEY).get.asInstanceOf[Integer].intValue + storage.put(KEY, new Integer(counter + 1)) self.reply(Tick:{counter + 1}) } else { - storage.put(KEY.getBytes, "0".getBytes) + storage.put(KEY, new Integer(0)) hasStartedTicking = true self.reply(Tick: 0) } @@ -124,11 +123,15 @@ class PersistentSimpleServiceActor extends Transactor { def receive = { case "Tick" => if (hasStartedTicking) { val bytes = storage.get(KEY.getBytes).get - val counter = ByteBuffer.wrap(bytes).getInt - storage.put(KEY.getBytes, ByteBuffer.allocate(4).putInt(counter + 1).array) + val counter = Integer.parseInt(new String(bytes, "UTF8")) + storage.put(KEY.getBytes, (counter + 1).toString.getBytes ) +// val bytes = storage.get(KEY.getBytes).get +// val counter = ByteBuffer.wrap(bytes).getInt +// storage.put(KEY.getBytes, ByteBuffer.allocate(4).putInt(counter + 1).array) self.reply(Tick:{counter + 1}) } else { - storage.put(KEY.getBytes, Array(0.toByte)) + storage.put(KEY.getBytes, "0".getBytes) +// storage.put(KEY.getBytes, Array(0.toByte)) hasStartedTicking = true self.reply(Tick: 0) } diff --git a/akka-sbt-plugin/project/build.properties b/akka-sbt-plugin/project/build.properties new file mode 100644 index 0000000000..27b9049bf2 --- /dev/null +++ b/akka-sbt-plugin/project/build.properties @@ -0,0 +1,6 @@ +project.name=Akka Plugin +project.organization=se.scalablesolutions.akka +# mirrors akka version +project.version=0.9.1 +sbt.version=0.7.4 +build.scala.versions=2.7.7 diff --git a/akka-sbt-plugin/project/build/AkkaPluginProject.scala b/akka-sbt-plugin/project/build/AkkaPluginProject.scala new file mode 100644 index 0000000000..4c63e9d14f --- /dev/null +++ b/akka-sbt-plugin/project/build/AkkaPluginProject.scala @@ -0,0 +1,3 @@ +import sbt._ + +class AkkaPluginProject(info: ProjectInfo) extends PluginProject(info) diff --git a/akka-sbt-plugin/src/main/scala/AkkaProject.scala b/akka-sbt-plugin/src/main/scala/AkkaProject.scala new file mode 100644 index 0000000000..5ec83204a2 --- /dev/null +++ b/akka-sbt-plugin/src/main/scala/AkkaProject.scala @@ -0,0 +1,48 @@ +import sbt._ + +object AkkaRepositories { + val AkkaRepo = MavenRepository("Akka Repository", "http://scalablesolutions.se/akka/repository") + val GuiceyFruitRepo = MavenRepository("GuiceyFruit Repo", "http://guiceyfruit.googlecode.com/svn/repo/releases/") + val JBossRepo = MavenRepository("JBoss Repo", "https://repository.jboss.org/nexus/content/groups/public/") + val SunJDMKRepo = MavenRepository("Sun JDMK Repo", "http://wp5.e-taxonomy.eu/cdmlib/mavenrepo") + val JavaNetRepo = MavenRepository("java.net Repo", "http://download.java.net/maven/2") +} + +trait AkkaBaseProject extends BasicScalaProject { + import AkkaRepositories._ + + // Every dependency that cannot be resolved from the built-in repositories (Maven Central and Scala Tools Releases) + // is resolved from a ModuleConfiguration. This will result in a significant acceleration of the update action. + + val akkaModuleConfig = ModuleConfiguration("se.scalablesolutions.akka", AkkaRepo) + val netLagModuleConfig = ModuleConfiguration("net.lag", AkkaRepo) + val sbinaryModuleConfig = ModuleConfiguration("sbinary", AkkaRepo) + val redisModuleConfig = ModuleConfiguration("com.redis", AkkaRepo) + val atmosphereModuleConfig = ModuleConfiguration("org.atmosphere", AkkaRepo) + val facebookModuleConfig = ModuleConfiguration("com.facebook", AkkaRepo) + val jsr166xModuleConfig = ModuleConfiguration("jsr166x", AkkaRepo) + val sjsonModuleConfig = ModuleConfiguration("sjson.json", AkkaRepo) + val voldemortModuleConfig = ModuleConfiguration("voldemort.store.compress", AkkaRepo) + val cassandraModuleConfig = ModuleConfiguration("org.apache.cassandra", AkkaRepo) + val guiceyFruitModuleConfig = ModuleConfiguration("org.guiceyfruit", GuiceyFruitRepo) + val jbossModuleConfig = ModuleConfiguration("org.jboss", JBossRepo) + val nettyModuleConfig = ModuleConfiguration("org.jboss.netty", JBossRepo) + val jgroupsModuleConfig = ModuleConfiguration("jgroups", JBossRepo) + val jmsModuleConfig = ModuleConfiguration("javax.jms", SunJDMKRepo) + val jdmkModuleConfig = ModuleConfiguration("com.sun.jdmk", SunJDMKRepo) + val jmxModuleConfig = ModuleConfiguration("com.sun.jmx", SunJDMKRepo) + val jerseyModuleConfig = ModuleConfiguration("com.sun.jersey", JavaNetRepo) + val jerseyContrModuleConfig = ModuleConfiguration("com.sun.jersey.contribs", JavaNetRepo) + val grizzlyModuleConfig = ModuleConfiguration("com.sun.grizzly", JavaNetRepo) + val liftModuleConfig = ModuleConfiguration("net.liftweb", ScalaToolsSnapshots) +} + +trait AkkaProject extends AkkaBaseProject { + val akkaVersion = "0.9.1" + + // convenience method + def akkaModule(module: String) = "se.scalablesolutions.akka" %% ("akka-" + module) % akkaVersion + + // akka core dependency by default + val akkaCore = akkaModule("core") +} diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index 850311c5f4..01d228c397 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -337,7 +337,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) { class AkkaSampleSecurityProject(info: ProjectInfo) extends AkkaDefaultProject(info, deployPath) { val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile" val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" % "compile" - val commons_codec = "commons-codec" % "commons-codec" % "1.3" % "compile" + val commons_codec = "commons-codec" % "commons-codec" % "1.4" % "compile" } class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {