closing #364, serializiation for typed actor proxy ref
This commit is contained in:
parent
a8f6ae8144
commit
025d76dc5e
5 changed files with 1149 additions and 111 deletions
|
|
@ -653,6 +653,360 @@ public final class RemoteProtocol {
|
||||||
// @@protoc_insertion_point(class_scope:RemoteActorRefProtocol)
|
// @@protoc_insertion_point(class_scope:RemoteActorRefProtocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class RemoteTypedActorRefProtocol extends
|
||||||
|
com.google.protobuf.GeneratedMessage {
|
||||||
|
// Use RemoteTypedActorRefProtocol.newBuilder() to construct.
|
||||||
|
private RemoteTypedActorRefProtocol() {
|
||||||
|
initFields();
|
||||||
|
}
|
||||||
|
private RemoteTypedActorRefProtocol(boolean noInit) {}
|
||||||
|
|
||||||
|
private static final RemoteTypedActorRefProtocol defaultInstance;
|
||||||
|
public static RemoteTypedActorRefProtocol getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoteTypedActorRefProtocol getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteTypedActorRefProtocol_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_RemoteTypedActorRefProtocol_fieldAccessorTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required .RemoteActorRefProtocol actorRef = 1;
|
||||||
|
public static final int ACTORREF_FIELD_NUMBER = 1;
|
||||||
|
private boolean hasActorRef;
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol actorRef_;
|
||||||
|
public boolean hasActorRef() { return hasActorRef; }
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getActorRef() { return actorRef_; }
|
||||||
|
|
||||||
|
// required string interfaceName = 2;
|
||||||
|
public static final int INTERFACENAME_FIELD_NUMBER = 2;
|
||||||
|
private boolean hasInterfaceName;
|
||||||
|
private java.lang.String interfaceName_ = "";
|
||||||
|
public boolean hasInterfaceName() { return hasInterfaceName; }
|
||||||
|
public java.lang.String getInterfaceName() { return interfaceName_; }
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
actorRef_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance();
|
||||||
|
}
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasActorRef) return false;
|
||||||
|
if (!hasInterfaceName) return false;
|
||||||
|
if (!getActorRef().isInitialized()) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
getSerializedSize();
|
||||||
|
if (hasActorRef()) {
|
||||||
|
output.writeMessage(1, getActorRef());
|
||||||
|
}
|
||||||
|
if (hasInterfaceName()) {
|
||||||
|
output.writeString(2, getInterfaceName());
|
||||||
|
}
|
||||||
|
getUnknownFields().writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int memoizedSerializedSize = -1;
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSerializedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (hasActorRef()) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(1, getActorRef());
|
||||||
|
}
|
||||||
|
if (hasInterfaceName()) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeStringSize(2, getInterfaceName());
|
||||||
|
}
|
||||||
|
size += getUnknownFields().getSerializedSize();
|
||||||
|
memoizedSerializedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessage.Builder<Builder> {
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol result;
|
||||||
|
|
||||||
|
// Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.newBuilder()
|
||||||
|
private Builder() {}
|
||||||
|
|
||||||
|
private static Builder create() {
|
||||||
|
Builder builder = new Builder();
|
||||||
|
builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol();
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol 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.RemoteTypedActorRefProtocol();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.getDescriptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol getDefaultInstanceForType() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInitialized() {
|
||||||
|
return result.isInitialized();
|
||||||
|
}
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol build() {
|
||||||
|
if (result != null && !isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return buildPartial();
|
||||||
|
}
|
||||||
|
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol buildParsed()
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
if (!isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(
|
||||||
|
result).asInvalidProtocolBufferException();
|
||||||
|
}
|
||||||
|
return buildPartial();
|
||||||
|
}
|
||||||
|
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol buildPartial() {
|
||||||
|
if (result == null) {
|
||||||
|
throw new IllegalStateException(
|
||||||
|
"build() has already been called on this Builder.");
|
||||||
|
}
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol returnMe = result;
|
||||||
|
result = null;
|
||||||
|
return returnMe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol) {
|
||||||
|
return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol other) {
|
||||||
|
if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.getDefaultInstance()) return this;
|
||||||
|
if (other.hasActorRef()) {
|
||||||
|
mergeActorRef(other.getActorRef());
|
||||||
|
}
|
||||||
|
if (other.hasInterfaceName()) {
|
||||||
|
setInterfaceName(other.getInterfaceName());
|
||||||
|
}
|
||||||
|
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: {
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder();
|
||||||
|
if (hasActorRef()) {
|
||||||
|
subBuilder.mergeFrom(getActorRef());
|
||||||
|
}
|
||||||
|
input.readMessage(subBuilder, extensionRegistry);
|
||||||
|
setActorRef(subBuilder.buildPartial());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
setInterfaceName(input.readString());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// required .RemoteActorRefProtocol actorRef = 1;
|
||||||
|
public boolean hasActorRef() {
|
||||||
|
return result.hasActorRef();
|
||||||
|
}
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol getActorRef() {
|
||||||
|
return result.getActorRef();
|
||||||
|
}
|
||||||
|
public Builder setActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
result.hasActorRef = true;
|
||||||
|
result.actorRef_ = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder setActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder builderForValue) {
|
||||||
|
result.hasActorRef = true;
|
||||||
|
result.actorRef_ = builderForValue.build();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder mergeActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol value) {
|
||||||
|
if (result.hasActorRef() &&
|
||||||
|
result.actorRef_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) {
|
||||||
|
result.actorRef_ =
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.newBuilder(result.actorRef_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
result.actorRef_ = value;
|
||||||
|
}
|
||||||
|
result.hasActorRef = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearActorRef() {
|
||||||
|
result.hasActorRef = false;
|
||||||
|
result.actorRef_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required string interfaceName = 2;
|
||||||
|
public boolean hasInterfaceName() {
|
||||||
|
return result.hasInterfaceName();
|
||||||
|
}
|
||||||
|
public java.lang.String getInterfaceName() {
|
||||||
|
return result.getInterfaceName();
|
||||||
|
}
|
||||||
|
public Builder setInterfaceName(java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
result.hasInterfaceName = true;
|
||||||
|
result.interfaceName_ = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearInterfaceName() {
|
||||||
|
result.hasInterfaceName = false;
|
||||||
|
result.interfaceName_ = getDefaultInstance().getInterfaceName();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:RemoteTypedActorRefProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new RemoteTypedActorRefProtocol(true);
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit();
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:RemoteTypedActorRefProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
public static final class SerializedActorRefProtocol extends
|
public static final class SerializedActorRefProtocol extends
|
||||||
com.google.protobuf.GeneratedMessage {
|
com.google.protobuf.GeneratedMessage {
|
||||||
// Use SerializedActorRefProtocol.newBuilder() to construct.
|
// Use SerializedActorRefProtocol.newBuilder() to construct.
|
||||||
|
|
@ -1559,6 +1913,360 @@ public final class RemoteProtocol {
|
||||||
// @@protoc_insertion_point(class_scope:SerializedActorRefProtocol)
|
// @@protoc_insertion_point(class_scope:SerializedActorRefProtocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class SerializedTypedActorRefProtocol extends
|
||||||
|
com.google.protobuf.GeneratedMessage {
|
||||||
|
// Use SerializedTypedActorRefProtocol.newBuilder() to construct.
|
||||||
|
private SerializedTypedActorRefProtocol() {
|
||||||
|
initFields();
|
||||||
|
}
|
||||||
|
private SerializedTypedActorRefProtocol(boolean noInit) {}
|
||||||
|
|
||||||
|
private static final SerializedTypedActorRefProtocol defaultInstance;
|
||||||
|
public static SerializedTypedActorRefProtocol getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SerializedTypedActorRefProtocol getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required .SerializedActorRefProtocol actorRef = 1;
|
||||||
|
public static final int ACTORREF_FIELD_NUMBER = 1;
|
||||||
|
private boolean hasActorRef;
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol actorRef_;
|
||||||
|
public boolean hasActorRef() { return hasActorRef; }
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol getActorRef() { return actorRef_; }
|
||||||
|
|
||||||
|
// required string interfaceName = 2;
|
||||||
|
public static final int INTERFACENAME_FIELD_NUMBER = 2;
|
||||||
|
private boolean hasInterfaceName;
|
||||||
|
private java.lang.String interfaceName_ = "";
|
||||||
|
public boolean hasInterfaceName() { return hasInterfaceName; }
|
||||||
|
public java.lang.String getInterfaceName() { return interfaceName_; }
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
actorRef_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance();
|
||||||
|
}
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasActorRef) return false;
|
||||||
|
if (!hasInterfaceName) return false;
|
||||||
|
if (!getActorRef().isInitialized()) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
getSerializedSize();
|
||||||
|
if (hasActorRef()) {
|
||||||
|
output.writeMessage(1, getActorRef());
|
||||||
|
}
|
||||||
|
if (hasInterfaceName()) {
|
||||||
|
output.writeString(2, getInterfaceName());
|
||||||
|
}
|
||||||
|
getUnknownFields().writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int memoizedSerializedSize = -1;
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSerializedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (hasActorRef()) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(1, getActorRef());
|
||||||
|
}
|
||||||
|
if (hasInterfaceName()) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeStringSize(2, getInterfaceName());
|
||||||
|
}
|
||||||
|
size += getUnknownFields().getSerializedSize();
|
||||||
|
memoizedSerializedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return newBuilder().mergeFrom(data).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return newBuilder().mergeFrom(input).buildParsed();
|
||||||
|
}
|
||||||
|
public static se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessage.Builder<Builder> {
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol result;
|
||||||
|
|
||||||
|
// Construct using se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.newBuilder()
|
||||||
|
private Builder() {}
|
||||||
|
|
||||||
|
private static Builder create() {
|
||||||
|
Builder builder = new Builder();
|
||||||
|
builder.result = new se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol();
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol 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.SerializedTypedActorRefProtocol();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.getDescriptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol getDefaultInstanceForType() {
|
||||||
|
return se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInitialized() {
|
||||||
|
return result.isInitialized();
|
||||||
|
}
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol build() {
|
||||||
|
if (result != null && !isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return buildPartial();
|
||||||
|
}
|
||||||
|
|
||||||
|
private se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol buildParsed()
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
if (!isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(
|
||||||
|
result).asInvalidProtocolBufferException();
|
||||||
|
}
|
||||||
|
return buildPartial();
|
||||||
|
}
|
||||||
|
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol buildPartial() {
|
||||||
|
if (result == null) {
|
||||||
|
throw new IllegalStateException(
|
||||||
|
"build() has already been called on this Builder.");
|
||||||
|
}
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol returnMe = result;
|
||||||
|
result = null;
|
||||||
|
return returnMe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol) {
|
||||||
|
return mergeFrom((se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol other) {
|
||||||
|
if (other == se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.getDefaultInstance()) return this;
|
||||||
|
if (other.hasActorRef()) {
|
||||||
|
mergeActorRef(other.getActorRef());
|
||||||
|
}
|
||||||
|
if (other.hasInterfaceName()) {
|
||||||
|
setInterfaceName(other.getInterfaceName());
|
||||||
|
}
|
||||||
|
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: {
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.Builder subBuilder = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.newBuilder();
|
||||||
|
if (hasActorRef()) {
|
||||||
|
subBuilder.mergeFrom(getActorRef());
|
||||||
|
}
|
||||||
|
input.readMessage(subBuilder, extensionRegistry);
|
||||||
|
setActorRef(subBuilder.buildPartial());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
setInterfaceName(input.readString());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// required .SerializedActorRefProtocol actorRef = 1;
|
||||||
|
public boolean hasActorRef() {
|
||||||
|
return result.hasActorRef();
|
||||||
|
}
|
||||||
|
public se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol getActorRef() {
|
||||||
|
return result.getActorRef();
|
||||||
|
}
|
||||||
|
public Builder setActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
result.hasActorRef = true;
|
||||||
|
result.actorRef_ = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder setActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.Builder builderForValue) {
|
||||||
|
result.hasActorRef = true;
|
||||||
|
result.actorRef_ = builderForValue.build();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder mergeActorRef(se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol value) {
|
||||||
|
if (result.hasActorRef() &&
|
||||||
|
result.actorRef_ != se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance()) {
|
||||||
|
result.actorRef_ =
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.newBuilder(result.actorRef_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
result.actorRef_ = value;
|
||||||
|
}
|
||||||
|
result.hasActorRef = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearActorRef() {
|
||||||
|
result.hasActorRef = false;
|
||||||
|
result.actorRef_ = se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// required string interfaceName = 2;
|
||||||
|
public boolean hasInterfaceName() {
|
||||||
|
return result.hasInterfaceName();
|
||||||
|
}
|
||||||
|
public java.lang.String getInterfaceName() {
|
||||||
|
return result.getInterfaceName();
|
||||||
|
}
|
||||||
|
public Builder setInterfaceName(java.lang.String value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
result.hasInterfaceName = true;
|
||||||
|
result.interfaceName_ = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
public Builder clearInterfaceName() {
|
||||||
|
result.hasInterfaceName = false;
|
||||||
|
result.interfaceName_ = getDefaultInstance().getInterfaceName();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:SerializedTypedActorRefProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new SerializedTypedActorRefProtocol(true);
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.internalForceInit();
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:SerializedTypedActorRefProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
public static final class MessageProtocol extends
|
public static final class MessageProtocol extends
|
||||||
com.google.protobuf.GeneratedMessage {
|
com.google.protobuf.GeneratedMessage {
|
||||||
// Use MessageProtocol.newBuilder() to construct.
|
// Use MessageProtocol.newBuilder() to construct.
|
||||||
|
|
@ -5700,11 +6408,21 @@ public final class RemoteProtocol {
|
||||||
private static
|
private static
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
internal_static_RemoteActorRefProtocol_fieldAccessorTable;
|
internal_static_RemoteActorRefProtocol_fieldAccessorTable;
|
||||||
|
private static com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_RemoteTypedActorRefProtocol_descriptor;
|
||||||
|
private static
|
||||||
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
|
internal_static_RemoteTypedActorRefProtocol_fieldAccessorTable;
|
||||||
private static com.google.protobuf.Descriptors.Descriptor
|
private static com.google.protobuf.Descriptors.Descriptor
|
||||||
internal_static_SerializedActorRefProtocol_descriptor;
|
internal_static_SerializedActorRefProtocol_descriptor;
|
||||||
private static
|
private static
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
internal_static_SerializedActorRefProtocol_fieldAccessorTable;
|
internal_static_SerializedActorRefProtocol_fieldAccessorTable;
|
||||||
|
private static com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_SerializedTypedActorRefProtocol_descriptor;
|
||||||
|
private static
|
||||||
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||||
|
internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable;
|
||||||
private static com.google.protobuf.Descriptors.Descriptor
|
private static com.google.protobuf.Descriptors.Descriptor
|
||||||
internal_static_MessageProtocol_descriptor;
|
internal_static_MessageProtocol_descriptor;
|
||||||
private static
|
private static
|
||||||
|
|
@ -5767,49 +6485,54 @@ public final class RemoteProtocol {
|
||||||
"\n\024RemoteProtocol.proto\"v\n\026RemoteActorRef" +
|
"\n\024RemoteProtocol.proto\"v\n\026RemoteActorRef" +
|
||||||
"Protocol\022\014\n\004uuid\030\001 \002(\t\022\026\n\016actorClassname" +
|
"Protocol\022\014\n\004uuid\030\001 \002(\t\022\026\n\016actorClassname" +
|
||||||
"\030\002 \002(\t\022%\n\013homeAddress\030\003 \002(\0132\020.AddressPro" +
|
"\030\002 \002(\t\022%\n\013homeAddress\030\003 \002(\0132\020.AddressPro" +
|
||||||
"tocol\022\017\n\007timeout\030\004 \001(\004\"\200\003\n\032SerializedAct" +
|
"tocol\022\017\n\007timeout\030\004 \001(\004\"_\n\033RemoteTypedAct" +
|
||||||
"orRefProtocol\022\014\n\004uuid\030\001 \002(\t\022\n\n\002id\030\002 \002(\t\022" +
|
"orRefProtocol\022)\n\010actorRef\030\001 \002(\0132\027.Remote" +
|
||||||
"\026\n\016actorClassname\030\003 \002(\t\022)\n\017originalAddre" +
|
"ActorRefProtocol\022\025\n\rinterfaceName\030\002 \002(\t\"" +
|
||||||
"ss\030\004 \002(\0132\020.AddressProtocol\022\025\n\ractorInsta" +
|
"\200\003\n\032SerializedActorRefProtocol\022\014\n\004uuid\030\001" +
|
||||||
"nce\030\005 \001(\014\022\033\n\023serializerClassname\030\006 \001(\t\022\024" +
|
" \002(\t\022\n\n\002id\030\002 \002(\t\022\026\n\016actorClassname\030\003 \002(\t" +
|
||||||
"\n\014isTransactor\030\007 \001(\010\022\017\n\007timeout\030\010 \001(\004\022\026\n" +
|
"\022)\n\017originalAddress\030\004 \002(\0132\020.AddressProto" +
|
||||||
"\016receiveTimeout\030\t \001(\004\022%\n\tlifeCycle\030\n \001(\013",
|
"col\022\025\n\ractorInstance\030\005 \001(\014\022\033\n\023serializer",
|
||||||
"2\022.LifeCycleProtocol\022+\n\nsupervisor\030\013 \001(\013" +
|
"Classname\030\006 \001(\t\022\024\n\014isTransactor\030\007 \001(\010\022\017\n" +
|
||||||
"2\027.RemoteActorRefProtocol\022\024\n\014hotswapStac" +
|
"\007timeout\030\010 \001(\004\022\026\n\016receiveTimeout\030\t \001(\004\022%" +
|
||||||
"k\030\014 \001(\014\022(\n\010messages\030\r \003(\0132\026.RemoteReques" +
|
"\n\tlifeCycle\030\n \001(\0132\022.LifeCycleProtocol\022+\n" +
|
||||||
"tProtocol\"r\n\017MessageProtocol\0225\n\023serializ" +
|
"\nsupervisor\030\013 \001(\0132\027.RemoteActorRefProtoc" +
|
||||||
"ationScheme\030\001 \002(\0162\030.SerializationSchemeT" +
|
"ol\022\024\n\014hotswapStack\030\014 \001(\014\022(\n\010messages\030\r \003" +
|
||||||
"ype\022\017\n\007message\030\002 \002(\014\022\027\n\017messageManifest\030" +
|
"(\0132\026.RemoteRequestProtocol\"g\n\037Serialized" +
|
||||||
"\003 \001(\014\"\236\001\n\021ActorInfoProtocol\022\014\n\004uuid\030\001 \002(" +
|
"TypedActorRefProtocol\022-\n\010actorRef\030\001 \002(\0132" +
|
||||||
"\t\022\016\n\006target\030\002 \002(\t\022\017\n\007timeout\030\003 \002(\004\022\035\n\tac" +
|
"\033.SerializedActorRefProtocol\022\025\n\rinterfac" +
|
||||||
"torType\030\004 \002(\0162\n.ActorType\022/\n\016typedActorI" +
|
"eName\030\002 \002(\t\"r\n\017MessageProtocol\0225\n\023serial" +
|
||||||
"nfo\030\005 \001(\0132\027.TypedActorInfoProtocol\022\n\n\002id",
|
"izationScheme\030\001 \002(\0162\030.SerializationSchem",
|
||||||
"\030\006 \001(\t\";\n\026TypedActorInfoProtocol\022\021\n\tinte" +
|
"eType\022\017\n\007message\030\002 \002(\014\022\027\n\017messageManifes" +
|
||||||
"rface\030\001 \002(\t\022\016\n\006method\030\002 \002(\t\"\352\001\n\025RemoteRe" +
|
"t\030\003 \001(\014\"\236\001\n\021ActorInfoProtocol\022\014\n\004uuid\030\001 " +
|
||||||
"questProtocol\022\n\n\002id\030\001 \002(\004\022!\n\007message\030\002 \002" +
|
"\002(\t\022\016\n\006target\030\002 \002(\t\022\017\n\007timeout\030\003 \002(\004\022\035\n\t" +
|
||||||
"(\0132\020.MessageProtocol\022%\n\tactorInfo\030\003 \002(\0132" +
|
"actorType\030\004 \002(\0162\n.ActorType\022/\n\016typedActo" +
|
||||||
"\022.ActorInfoProtocol\022\020\n\010isOneWay\030\004 \002(\010\022\026\n" +
|
"rInfo\030\005 \001(\0132\027.TypedActorInfoProtocol\022\n\n\002" +
|
||||||
"\016supervisorUuid\030\005 \001(\t\022\'\n\006sender\030\006 \001(\0132\027." +
|
"id\030\006 \001(\t\";\n\026TypedActorInfoProtocol\022\021\n\tin" +
|
||||||
"RemoteActorRefProtocol\022(\n\010metadata\030\007 \003(\013" +
|
"terface\030\001 \002(\t\022\016\n\006method\030\002 \002(\t\"\352\001\n\025Remote" +
|
||||||
"2\026.MetadataEntryProtocol\"\324\001\n\023RemoteReply" +
|
"RequestProtocol\022\n\n\002id\030\001 \002(\004\022!\n\007message\030\002" +
|
||||||
"Protocol\022\n\n\002id\030\001 \002(\004\022!\n\007message\030\002 \001(\0132\020." +
|
" \002(\0132\020.MessageProtocol\022%\n\tactorInfo\030\003 \002(" +
|
||||||
"MessageProtocol\022%\n\texception\030\003 \001(\0132\022.Exc",
|
"\0132\022.ActorInfoProtocol\022\020\n\010isOneWay\030\004 \002(\010\022",
|
||||||
"eptionProtocol\022\026\n\016supervisorUuid\030\004 \001(\t\022\017" +
|
"\026\n\016supervisorUuid\030\005 \001(\t\022\'\n\006sender\030\006 \001(\0132" +
|
||||||
"\n\007isActor\030\005 \002(\010\022\024\n\014isSuccessful\030\006 \002(\010\022(\n" +
|
"\027.RemoteActorRefProtocol\022(\n\010metadata\030\007 \003" +
|
||||||
"\010metadata\030\007 \003(\0132\026.MetadataEntryProtocol\"" +
|
"(\0132\026.MetadataEntryProtocol\"\324\001\n\023RemoteRep" +
|
||||||
")\n\014UuidProtocol\022\014\n\004high\030\001 \002(\004\022\013\n\003low\030\002 \002" +
|
"lyProtocol\022\n\n\002id\030\001 \002(\004\022!\n\007message\030\002 \001(\0132" +
|
||||||
"(\004\"3\n\025MetadataEntryProtocol\022\013\n\003key\030\001 \002(\t" +
|
"\020.MessageProtocol\022%\n\texception\030\003 \001(\0132\022.E" +
|
||||||
"\022\r\n\005value\030\002 \002(\014\"6\n\021LifeCycleProtocol\022!\n\t" +
|
"xceptionProtocol\022\026\n\016supervisorUuid\030\004 \001(\t" +
|
||||||
"lifeCycle\030\001 \002(\0162\016.LifeCycleType\"1\n\017Addre" +
|
"\022\017\n\007isActor\030\005 \002(\010\022\024\n\014isSuccessful\030\006 \002(\010\022" +
|
||||||
"ssProtocol\022\020\n\010hostname\030\001 \002(\t\022\014\n\004port\030\002 \002" +
|
"(\n\010metadata\030\007 \003(\0132\026.MetadataEntryProtoco" +
|
||||||
"(\r\"7\n\021ExceptionProtocol\022\021\n\tclassname\030\001 \002" +
|
"l\")\n\014UuidProtocol\022\014\n\004high\030\001 \002(\004\022\013\n\003low\030\002" +
|
||||||
"(\t\022\017\n\007message\030\002 \002(\t*=\n\tActorType\022\017\n\013SCAL",
|
" \002(\004\"3\n\025MetadataEntryProtocol\022\013\n\003key\030\001 \002",
|
||||||
"A_ACTOR\020\001\022\016\n\nJAVA_ACTOR\020\002\022\017\n\013TYPED_ACTOR" +
|
"(\t\022\r\n\005value\030\002 \002(\014\"6\n\021LifeCycleProtocol\022!" +
|
||||||
"\020\003*]\n\027SerializationSchemeType\022\010\n\004JAVA\020\001\022" +
|
"\n\tlifeCycle\030\001 \002(\0162\016.LifeCycleType\"1\n\017Add" +
|
||||||
"\013\n\007SBINARY\020\002\022\016\n\nSCALA_JSON\020\003\022\r\n\tJAVA_JSO" +
|
"ressProtocol\022\020\n\010hostname\030\001 \002(\t\022\014\n\004port\030\002" +
|
||||||
"N\020\004\022\014\n\010PROTOBUF\020\005*-\n\rLifeCycleType\022\r\n\tPE" +
|
" \002(\r\"7\n\021ExceptionProtocol\022\021\n\tclassname\030\001" +
|
||||||
"RMANENT\020\001\022\r\n\tTEMPORARY\020\002B-\n)se.scalables" +
|
" \002(\t\022\017\n\007message\030\002 \002(\t*=\n\tActorType\022\017\n\013SC" +
|
||||||
"olutions.akka.remote.protocolH\001"
|
"ALA_ACTOR\020\001\022\016\n\nJAVA_ACTOR\020\002\022\017\n\013TYPED_ACT" +
|
||||||
|
"OR\020\003*]\n\027SerializationSchemeType\022\010\n\004JAVA\020" +
|
||||||
|
"\001\022\013\n\007SBINARY\020\002\022\016\n\nSCALA_JSON\020\003\022\r\n\tJAVA_J" +
|
||||||
|
"SON\020\004\022\014\n\010PROTOBUF\020\005*-\n\rLifeCycleType\022\r\n\t" +
|
||||||
|
"PERMANENT\020\001\022\r\n\tTEMPORARY\020\002B-\n)se.scalabl",
|
||||||
|
"esolutions.akka.remote.protocolH\001"
|
||||||
};
|
};
|
||||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||||
|
|
@ -5824,16 +6547,32 @@ public final class RemoteProtocol {
|
||||||
new java.lang.String[] { "Uuid", "ActorClassname", "HomeAddress", "Timeout", },
|
new java.lang.String[] { "Uuid", "ActorClassname", "HomeAddress", "Timeout", },
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteActorRefProtocol.Builder.class);
|
||||||
internal_static_SerializedActorRefProtocol_descriptor =
|
internal_static_RemoteTypedActorRefProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(1);
|
getDescriptor().getMessageTypes().get(1);
|
||||||
|
internal_static_RemoteTypedActorRefProtocol_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
|
internal_static_RemoteTypedActorRefProtocol_descriptor,
|
||||||
|
new java.lang.String[] { "ActorRef", "InterfaceName", },
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.class,
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteTypedActorRefProtocol.Builder.class);
|
||||||
|
internal_static_SerializedActorRefProtocol_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(2);
|
||||||
internal_static_SerializedActorRefProtocol_fieldAccessorTable = new
|
internal_static_SerializedActorRefProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_SerializedActorRefProtocol_descriptor,
|
internal_static_SerializedActorRefProtocol_descriptor,
|
||||||
new java.lang.String[] { "Uuid", "Id", "ActorClassname", "OriginalAddress", "ActorInstance", "SerializerClassname", "IsTransactor", "Timeout", "ReceiveTimeout", "LifeCycle", "Supervisor", "HotswapStack", "Messages", },
|
new java.lang.String[] { "Uuid", "Id", "ActorClassname", "OriginalAddress", "ActorInstance", "SerializerClassname", "IsTransactor", "Timeout", "ReceiveTimeout", "LifeCycle", "Supervisor", "HotswapStack", "Messages", },
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedActorRefProtocol.Builder.class);
|
||||||
|
internal_static_SerializedTypedActorRefProtocol_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(3);
|
||||||
|
internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
|
internal_static_SerializedTypedActorRefProtocol_descriptor,
|
||||||
|
new java.lang.String[] { "ActorRef", "InterfaceName", },
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.class,
|
||||||
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.SerializedTypedActorRefProtocol.Builder.class);
|
||||||
internal_static_MessageProtocol_descriptor =
|
internal_static_MessageProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(2);
|
getDescriptor().getMessageTypes().get(4);
|
||||||
internal_static_MessageProtocol_fieldAccessorTable = new
|
internal_static_MessageProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_MessageProtocol_descriptor,
|
internal_static_MessageProtocol_descriptor,
|
||||||
|
|
@ -5841,7 +6580,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MessageProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MessageProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MessageProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MessageProtocol.Builder.class);
|
||||||
internal_static_ActorInfoProtocol_descriptor =
|
internal_static_ActorInfoProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(3);
|
getDescriptor().getMessageTypes().get(5);
|
||||||
internal_static_ActorInfoProtocol_fieldAccessorTable = new
|
internal_static_ActorInfoProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_ActorInfoProtocol_descriptor,
|
internal_static_ActorInfoProtocol_descriptor,
|
||||||
|
|
@ -5849,7 +6588,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ActorInfoProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ActorInfoProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ActorInfoProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.ActorInfoProtocol.Builder.class);
|
||||||
internal_static_TypedActorInfoProtocol_descriptor =
|
internal_static_TypedActorInfoProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(4);
|
getDescriptor().getMessageTypes().get(6);
|
||||||
internal_static_TypedActorInfoProtocol_fieldAccessorTable = new
|
internal_static_TypedActorInfoProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_TypedActorInfoProtocol_descriptor,
|
internal_static_TypedActorInfoProtocol_descriptor,
|
||||||
|
|
@ -5857,7 +6596,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.TypedActorInfoProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.TypedActorInfoProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.TypedActorInfoProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.TypedActorInfoProtocol.Builder.class);
|
||||||
internal_static_RemoteRequestProtocol_descriptor =
|
internal_static_RemoteRequestProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(5);
|
getDescriptor().getMessageTypes().get(7);
|
||||||
internal_static_RemoteRequestProtocol_fieldAccessorTable = new
|
internal_static_RemoteRequestProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_RemoteRequestProtocol_descriptor,
|
internal_static_RemoteRequestProtocol_descriptor,
|
||||||
|
|
@ -5865,7 +6604,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteRequestProtocol.Builder.class);
|
||||||
internal_static_RemoteReplyProtocol_descriptor =
|
internal_static_RemoteReplyProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(6);
|
getDescriptor().getMessageTypes().get(8);
|
||||||
internal_static_RemoteReplyProtocol_fieldAccessorTable = new
|
internal_static_RemoteReplyProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_RemoteReplyProtocol_descriptor,
|
internal_static_RemoteReplyProtocol_descriptor,
|
||||||
|
|
@ -5873,7 +6612,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.RemoteReplyProtocol.Builder.class);
|
||||||
internal_static_UuidProtocol_descriptor =
|
internal_static_UuidProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(7);
|
getDescriptor().getMessageTypes().get(9);
|
||||||
internal_static_UuidProtocol_fieldAccessorTable = new
|
internal_static_UuidProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_UuidProtocol_descriptor,
|
internal_static_UuidProtocol_descriptor,
|
||||||
|
|
@ -5881,7 +6620,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.UuidProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.UuidProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.UuidProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.UuidProtocol.Builder.class);
|
||||||
internal_static_MetadataEntryProtocol_descriptor =
|
internal_static_MetadataEntryProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(8);
|
getDescriptor().getMessageTypes().get(10);
|
||||||
internal_static_MetadataEntryProtocol_fieldAccessorTable = new
|
internal_static_MetadataEntryProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_MetadataEntryProtocol_descriptor,
|
internal_static_MetadataEntryProtocol_descriptor,
|
||||||
|
|
@ -5889,7 +6628,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MetadataEntryProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MetadataEntryProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MetadataEntryProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.MetadataEntryProtocol.Builder.class);
|
||||||
internal_static_LifeCycleProtocol_descriptor =
|
internal_static_LifeCycleProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(9);
|
getDescriptor().getMessageTypes().get(11);
|
||||||
internal_static_LifeCycleProtocol_fieldAccessorTable = new
|
internal_static_LifeCycleProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_LifeCycleProtocol_descriptor,
|
internal_static_LifeCycleProtocol_descriptor,
|
||||||
|
|
@ -5897,7 +6636,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.LifeCycleProtocol.Builder.class);
|
||||||
internal_static_AddressProtocol_descriptor =
|
internal_static_AddressProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(10);
|
getDescriptor().getMessageTypes().get(12);
|
||||||
internal_static_AddressProtocol_fieldAccessorTable = new
|
internal_static_AddressProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_AddressProtocol_descriptor,
|
internal_static_AddressProtocol_descriptor,
|
||||||
|
|
@ -5905,7 +6644,7 @@ public final class RemoteProtocol {
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.class,
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.class,
|
||||||
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder.class);
|
se.scalablesolutions.akka.remote.protocol.RemoteProtocol.AddressProtocol.Builder.class);
|
||||||
internal_static_ExceptionProtocol_descriptor =
|
internal_static_ExceptionProtocol_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(11);
|
getDescriptor().getMessageTypes().get(13);
|
||||||
internal_static_ExceptionProtocol_fieldAccessorTable = new
|
internal_static_ExceptionProtocol_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_ExceptionProtocol_descriptor,
|
internal_static_ExceptionProtocol_descriptor,
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,15 @@ message RemoteActorRefProtocol {
|
||||||
optional uint64 timeout = 4;
|
optional uint64 timeout = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines a remote ActorRef that "remembers" and uses its original typed Actor instance
|
||||||
|
* on the original node.
|
||||||
|
*/
|
||||||
|
message RemoteTypedActorRefProtocol {
|
||||||
|
required RemoteActorRefProtocol actorRef = 1;
|
||||||
|
required string interfaceName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a fully serialized remote ActorRef (with serialized Actor instance)
|
* Defines a fully serialized remote ActorRef (with serialized Actor instance)
|
||||||
* that is about to be instantiated on the remote node. It is fully disconnected
|
* that is about to be instantiated on the remote node. It is fully disconnected
|
||||||
|
|
@ -43,6 +52,16 @@ message SerializedActorRefProtocol {
|
||||||
repeated RemoteRequestProtocol messages = 13;
|
repeated RemoteRequestProtocol messages = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines a fully serialized remote ActorRef (with serialized typed actor instance)
|
||||||
|
* that is about to be instantiated on the remote node. It is fully disconnected
|
||||||
|
* from its original host.
|
||||||
|
*/
|
||||||
|
message SerializedTypedActorRefProtocol {
|
||||||
|
required SerializedActorRefProtocol actorRef = 1;
|
||||||
|
required string interfaceName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a message.
|
* Defines a message.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
package se.scalablesolutions.akka.serialization
|
package se.scalablesolutions.akka.serialization
|
||||||
|
|
||||||
import se.scalablesolutions.akka.actor.{Actor, ActorRef, LocalActorRef, RemoteActorRef, IllegalActorStateException, ActorType}
|
|
||||||
import se.scalablesolutions.akka.stm.global._
|
import se.scalablesolutions.akka.stm.global._
|
||||||
import se.scalablesolutions.akka.stm.TransactionManagement._
|
import se.scalablesolutions.akka.stm.TransactionManagement._
|
||||||
import se.scalablesolutions.akka.stm.TransactionManagement
|
import se.scalablesolutions.akka.stm.TransactionManagement
|
||||||
|
|
@ -15,6 +14,7 @@ import se.scalablesolutions.akka.config.{AllForOneStrategy, OneForOneStrategy, F
|
||||||
import se.scalablesolutions.akka.config.ScalaConfig._
|
import se.scalablesolutions.akka.config.ScalaConfig._
|
||||||
|
|
||||||
import com.google.protobuf.ByteString
|
import com.google.protobuf.ByteString
|
||||||
|
import se.scalablesolutions.akka.actor._
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type class definition for Actor Serialization
|
* Type class definition for Actor Serialization
|
||||||
|
|
@ -43,6 +43,7 @@ trait Format[T <: Actor] extends FromBinary[T] with ToBinary[T]
|
||||||
*/
|
*/
|
||||||
trait StatelessActorFormat[T <: Actor] extends Format[T] {
|
trait StatelessActorFormat[T <: Actor] extends Format[T] {
|
||||||
def fromBinary(bytes: Array[Byte], act: T) = act
|
def fromBinary(bytes: Array[Byte], act: T) = act
|
||||||
|
|
||||||
def toBinary(ac: T) = Array.empty[Byte]
|
def toBinary(ac: T) = Array.empty[Byte]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +63,9 @@ trait StatelessActorFormat[T <: Actor] extends Format[T] {
|
||||||
*/
|
*/
|
||||||
trait SerializerBasedActorFormat[T <: Actor] extends Format[T] {
|
trait SerializerBasedActorFormat[T <: Actor] extends Format[T] {
|
||||||
val serializer: Serializer
|
val serializer: Serializer
|
||||||
|
|
||||||
def fromBinary(bytes: Array[Byte], act: T) = serializer.fromBinary(bytes, Some(act.self.actorClass)).asInstanceOf[T]
|
def fromBinary(bytes: Array[Byte], act: T) = serializer.fromBinary(bytes, Some(act.self.actorClass)).asInstanceOf[T]
|
||||||
|
|
||||||
def toBinary(ac: T) = serializer.toBinary(ac)
|
def toBinary(ac: T) = serializer.toBinary(ac)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,7 +73,6 @@ trait SerializerBasedActorFormat[T <: Actor] extends Format[T] {
|
||||||
* Module for local actor serialization.
|
* Module for local actor serialization.
|
||||||
*/
|
*/
|
||||||
object ActorSerialization {
|
object ActorSerialization {
|
||||||
|
|
||||||
def fromBinary[T <: Actor](bytes: Array[Byte])(implicit format: Format[T]): ActorRef =
|
def fromBinary[T <: Actor](bytes: Array[Byte])(implicit format: Format[T]): ActorRef =
|
||||||
fromBinaryToLocalActorRef(bytes, format)
|
fromBinaryToLocalActorRef(bytes, format)
|
||||||
|
|
||||||
|
|
@ -85,7 +87,7 @@ object ActorSerialization {
|
||||||
def toBinaryJ[T <: Actor](a: ActorRef, format: Format[T]): Array[Byte] =
|
def toBinaryJ[T <: Actor](a: ActorRef, format: Format[T]): Array[Byte] =
|
||||||
toBinary(a)(format)
|
toBinary(a)(format)
|
||||||
|
|
||||||
private def toSerializedActorRefProtocol[T <: Actor](
|
private[akka] def toSerializedActorRefProtocol[T <: Actor](
|
||||||
actorRef: ActorRef, format: Format[T]): SerializedActorRefProtocol = {
|
actorRef: ActorRef, format: Format[T]): SerializedActorRefProtocol = {
|
||||||
val lifeCycleProtocol: Option[LifeCycleProtocol] = {
|
val lifeCycleProtocol: Option[LifeCycleProtocol] = {
|
||||||
def setScope(builder: LifeCycleProtocol.Builder, scope: Scope) = scope match {
|
def setScope(builder: LifeCycleProtocol.Builder, scope: Scope) = scope match {
|
||||||
|
|
@ -126,7 +128,7 @@ object ActorSerialization {
|
||||||
private def fromBinaryToLocalActorRef[T <: Actor](bytes: Array[Byte], format: Format[T]): ActorRef =
|
private def fromBinaryToLocalActorRef[T <: Actor](bytes: Array[Byte], format: Format[T]): ActorRef =
|
||||||
fromProtobufToLocalActorRef(SerializedActorRefProtocol.newBuilder.mergeFrom(bytes).build, format, None)
|
fromProtobufToLocalActorRef(SerializedActorRefProtocol.newBuilder.mergeFrom(bytes).build, format, None)
|
||||||
|
|
||||||
private def fromProtobufToLocalActorRef[T <: Actor](
|
private[akka] def fromProtobufToLocalActorRef[T <: Actor](
|
||||||
protocol: SerializedActorRefProtocol, format: Format[T], loader: Option[ClassLoader]): ActorRef = {
|
protocol: SerializedActorRefProtocol, format: Format[T], loader: Option[ClassLoader]): ActorRef = {
|
||||||
Actor.log.debug("Deserializing SerializedActorRefProtocol to LocalActorRef:\n" + protocol)
|
Actor.log.debug("Deserializing SerializedActorRefProtocol to LocalActorRef:\n" + protocol)
|
||||||
|
|
||||||
|
|
@ -253,7 +255,8 @@ object RemoteActorSerialization {
|
||||||
.setTarget(actorClassName)
|
.setTarget(actorClassName)
|
||||||
.setTimeout(timeout)
|
.setTimeout(timeout)
|
||||||
|
|
||||||
typedActorInfo.foreach { typedActor =>
|
typedActorInfo.foreach {
|
||||||
|
typedActor =>
|
||||||
actorInfoBuilder.setTypedActorInfo(
|
actorInfoBuilder.setTypedActorInfo(
|
||||||
TypedActorInfoProtocol.newBuilder
|
TypedActorInfoProtocol.newBuilder
|
||||||
.setInterface(typedActor._1)
|
.setInterface(typedActor._1)
|
||||||
|
|
@ -276,10 +279,110 @@ object RemoteActorSerialization {
|
||||||
val id = registerSupervisorAsRemoteActor
|
val id = registerSupervisorAsRemoteActor
|
||||||
if (id.isDefined) requestBuilder.setSupervisorUuid(id.get)
|
if (id.isDefined) requestBuilder.setSupervisorUuid(id.get)
|
||||||
|
|
||||||
senderOption.foreach { sender =>
|
senderOption.foreach {
|
||||||
|
sender =>
|
||||||
RemoteServer.getOrCreateServer(sender.homeAddress).register(sender.uuid, sender)
|
RemoteServer.getOrCreateServer(sender.homeAddress).register(sender.uuid, sender)
|
||||||
requestBuilder.setSender(toRemoteActorRefProtocol(sender))
|
requestBuilder.setSender(toRemoteActorRefProtocol(sender))
|
||||||
}
|
}
|
||||||
requestBuilder
|
requestBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module for local typed actor serialization.
|
||||||
|
*/
|
||||||
|
object TypedActorSerialization {
|
||||||
|
|
||||||
|
def fromBinary[T <: Actor, U <: AnyRef](bytes: Array[Byte])(implicit format: Format[T]): U =
|
||||||
|
fromBinaryToLocalTypedActorRef(bytes, format)
|
||||||
|
|
||||||
|
def toBinary[T <: Actor](proxy: AnyRef)(implicit format: Format[T]): Array[Byte] = {
|
||||||
|
toSerializedTypedActorRefProtocol(proxy, format).toByteArray
|
||||||
|
}
|
||||||
|
|
||||||
|
// wrapper for implicits to be used by Java
|
||||||
|
def fromBinaryJ[T <: Actor, U <: AnyRef](bytes: Array[Byte], format: Format[T]): U =
|
||||||
|
fromBinary(bytes)(format)
|
||||||
|
|
||||||
|
// wrapper for implicits to be used by Java
|
||||||
|
def toBinaryJ[T <: Actor](a: AnyRef, format: Format[T]): Array[Byte] =
|
||||||
|
toBinary(a)(format)
|
||||||
|
|
||||||
|
private def toSerializedTypedActorRefProtocol[T <: Actor](
|
||||||
|
proxy: AnyRef, format: Format[T]): SerializedTypedActorRefProtocol = {
|
||||||
|
|
||||||
|
val init = AspectInitRegistry.initFor(proxy)
|
||||||
|
if (init == null) throw new IllegalArgumentException("Proxy for typed actor could not be found in AspectInitRegistry.")
|
||||||
|
|
||||||
|
SerializedTypedActorRefProtocol.newBuilder
|
||||||
|
.setActorRef(ActorSerialization.toSerializedActorRefProtocol(init.actorRef, format))
|
||||||
|
.setInterfaceName(init.interfaceClass.getName)
|
||||||
|
.build
|
||||||
|
}
|
||||||
|
|
||||||
|
private def fromBinaryToLocalTypedActorRef[T <: Actor, U <: AnyRef](bytes: Array[Byte], format: Format[T]): U =
|
||||||
|
fromProtobufToLocalTypedActorRef(SerializedTypedActorRefProtocol.newBuilder.mergeFrom(bytes).build, format, None)
|
||||||
|
|
||||||
|
private def fromProtobufToLocalTypedActorRef[T <: Actor, U <: AnyRef](
|
||||||
|
protocol: SerializedTypedActorRefProtocol, format: Format[T], loader: Option[ClassLoader]): U = {
|
||||||
|
Actor.log.debug("Deserializing SerializedTypedActorRefProtocol to LocalActorRef:\n" + protocol)
|
||||||
|
val actorRef = ActorSerialization.fromProtobufToLocalActorRef(protocol.getActorRef, format, loader)
|
||||||
|
val intfClass = toClass(loader, protocol.getInterfaceName)
|
||||||
|
TypedActor.newInstance(intfClass, actorRef).asInstanceOf[U]
|
||||||
|
}
|
||||||
|
|
||||||
|
private[akka] def toClass[U <: AnyRef](loader: Option[ClassLoader], name: String): Class[U] = {
|
||||||
|
val classLoader = loader.getOrElse(getClass.getClassLoader)
|
||||||
|
val clazz = classLoader.loadClass(name)
|
||||||
|
clazz.asInstanceOf[Class[U]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module for remote typed actor serialization.
|
||||||
|
*/
|
||||||
|
object RemoteTypedActorSerialization {
|
||||||
|
/**
|
||||||
|
* Deserializes a byte array (Array[Byte]) into an RemoteActorRef instance.
|
||||||
|
*/
|
||||||
|
def fromBinaryToRemoteTypedActorRef[T <: AnyRef](bytes: Array[Byte]): T =
|
||||||
|
fromProtobufToRemoteTypedActorRef(RemoteTypedActorRefProtocol.newBuilder.mergeFrom(bytes).build, None)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes a byte array (Array[Byte]) into a AW RemoteActorRef proxy.
|
||||||
|
*/
|
||||||
|
def fromBinaryToRemoteTypedActorRef[T <: AnyRef](bytes: Array[Byte], loader: ClassLoader): T =
|
||||||
|
fromProtobufToRemoteTypedActorRef(RemoteTypedActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize as AW RemoteActorRef proxy.
|
||||||
|
*/
|
||||||
|
def toBinary[T <: Actor](proxy: AnyRef): Array[Byte] = {
|
||||||
|
toRemoteTypedActorRefProtocol(proxy).toByteArray
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes a RemoteTypedActorRefProtocol Protocol Buffers (protobuf) Message into AW RemoteActorRef proxy.
|
||||||
|
*/
|
||||||
|
private[akka] def fromProtobufToRemoteTypedActorRef[T](protocol: RemoteTypedActorRefProtocol, loader: Option[ClassLoader]): T = {
|
||||||
|
Actor.log.debug("Deserializing RemoteTypedActorRefProtocol to AW RemoteActorRef proxy:\n" + protocol)
|
||||||
|
val actorRef = RemoteActorSerialization.fromProtobufToRemoteActorRef(protocol.getActorRef, loader)
|
||||||
|
val intfClass = TypedActorSerialization.toClass(loader, protocol.getInterfaceName)
|
||||||
|
TypedActor.createProxyForRemoteActorRef(intfClass, actorRef).asInstanceOf[T]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the AW TypedActor proxy into a Protocol Buffers (protobuf) Message.
|
||||||
|
*/
|
||||||
|
def toRemoteTypedActorRefProtocol(proxy: AnyRef): RemoteTypedActorRefProtocol = {
|
||||||
|
val init = AspectInitRegistry.initFor(proxy)
|
||||||
|
RemoteTypedActorRefProtocol.newBuilder
|
||||||
|
.setActorRef(RemoteActorSerialization.toRemoteActorRefProtocol(init.actorRef))
|
||||||
|
.setInterfaceName(init.interfaceClass.getName)
|
||||||
|
.build
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2009-2010 Scalable Solutions AB <http://scalablesolutions.se>
|
||||||
|
*/
|
||||||
|
package se.scalablesolutions.akka.actor.serialization
|
||||||
|
|
||||||
|
import org.scalatest.Spec
|
||||||
|
import org.scalatest.matchers.ShouldMatchers
|
||||||
|
import org.scalatest.BeforeAndAfterAll
|
||||||
|
import org.scalatest.junit.JUnitRunner
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
import se.scalablesolutions.akka.serialization._
|
||||||
|
import se.scalablesolutions.akka.actor._
|
||||||
|
|
||||||
|
import TypedActorSerialization._
|
||||||
|
import Actor._
|
||||||
|
import se.scalablesolutions.akka.remote.{RemoteClient, RemoteServer}
|
||||||
|
import se.scalablesolutions.akka.actor.remote.ServerInitiatedRemoteActorSpec.RemoteActorSpecActorUnidirectional
|
||||||
|
|
||||||
|
@RunWith(classOf[JUnitRunner])
|
||||||
|
class TypedActorSerializationSpec extends
|
||||||
|
Spec with
|
||||||
|
ShouldMatchers with
|
||||||
|
BeforeAndAfterAll {
|
||||||
|
|
||||||
|
var server1: RemoteServer = null
|
||||||
|
var typedActor: MyTypedActor = null
|
||||||
|
|
||||||
|
override def beforeAll = {
|
||||||
|
server1 = new RemoteServer().start("localhost", 9991)
|
||||||
|
typedActor = TypedActor.newInstance(classOf[MyTypedActor], classOf[MyTypedActorImpl], 1000)
|
||||||
|
server1.registerTypedActor("typed-actor-service", typedActor)
|
||||||
|
Thread.sleep(1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure the servers shutdown cleanly after the test has finished
|
||||||
|
override def afterAll = {
|
||||||
|
try {
|
||||||
|
TypedActor.stop(typedActor)
|
||||||
|
server1.shutdown
|
||||||
|
RemoteClient.shutdownAll
|
||||||
|
Thread.sleep(1000)
|
||||||
|
} catch {
|
||||||
|
case e => ()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object MyTypedStatelessActorFormat extends StatelessActorFormat[MyStatelessTypedActorImpl]
|
||||||
|
|
||||||
|
class MyTypedActorFormat extends Format[MyTypedActorImpl] {
|
||||||
|
def fromBinary(bytes: Array[Byte], act: MyTypedActorImpl) = {
|
||||||
|
val p = Serializer.Protobuf.fromBinary(bytes, Some(classOf[ProtobufProtocol.Counter])).asInstanceOf[ProtobufProtocol.Counter]
|
||||||
|
act.count = p.getCount
|
||||||
|
act
|
||||||
|
}
|
||||||
|
def toBinary(ac: MyTypedActorImpl) =
|
||||||
|
ProtobufProtocol.Counter.newBuilder.setCount(ac.count).build.toByteArray
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyTypedActorWithDualCounterFormat extends Format[MyTypedActorWithDualCounter] {
|
||||||
|
def fromBinary(bytes: Array[Byte], act: MyTypedActorWithDualCounter) = {
|
||||||
|
val p = Serializer.Protobuf.fromBinary(bytes, Some(classOf[ProtobufProtocol.DualCounter])).asInstanceOf[ProtobufProtocol.DualCounter]
|
||||||
|
act.count1 = p.getCount1
|
||||||
|
act.count2 = p.getCount2
|
||||||
|
act
|
||||||
|
}
|
||||||
|
def toBinary(ac: MyTypedActorWithDualCounter) =
|
||||||
|
ProtobufProtocol.DualCounter.newBuilder.setCount1(ac.count1).setCount2(ac.count2).build.toByteArray
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
describe("Serializable typed actor") {
|
||||||
|
|
||||||
|
it("should be able to serialize and de-serialize a stateless typed actor") {
|
||||||
|
val typedActor1 = TypedActor.newInstance(classOf[MyTypedActor], classOf[MyStatelessTypedActorImpl], 1000)
|
||||||
|
typedActor1.requestReply("hello") should equal("world")
|
||||||
|
typedActor1.requestReply("hello") should equal("world")
|
||||||
|
|
||||||
|
val bytes = toBinaryJ(typedActor1, MyTypedStatelessActorFormat)
|
||||||
|
val typedActor2: MyTypedActor = fromBinaryJ(bytes, MyTypedStatelessActorFormat)
|
||||||
|
typedActor2.requestReply("hello") should equal("world")
|
||||||
|
}
|
||||||
|
|
||||||
|
it("should be able to serialize and de-serialize a stateful typed actor") {
|
||||||
|
val typedActor1 = TypedActor.newInstance(classOf[MyTypedActor], classOf[MyTypedActorImpl], 1000)
|
||||||
|
typedActor1.requestReply("hello") should equal("world 1")
|
||||||
|
typedActor1.requestReply("scala") should equal("hello scala 2")
|
||||||
|
|
||||||
|
val f = new MyTypedActorFormat
|
||||||
|
val bytes = toBinaryJ(typedActor1, f)
|
||||||
|
val typedActor2: MyTypedActor = fromBinaryJ(bytes, f)
|
||||||
|
typedActor2.requestReply("hello") should equal("world 3")
|
||||||
|
}
|
||||||
|
|
||||||
|
it("should be able to serialize and de-serialize a stateful typed actor with compound state") {
|
||||||
|
val typedActor1 = TypedActor.newInstance(classOf[MyTypedActor], classOf[MyTypedActorWithDualCounter], 1000)
|
||||||
|
typedActor1.requestReply("hello") should equal("world 1 1")
|
||||||
|
typedActor1.requestReply("hello") should equal("world 2 2")
|
||||||
|
|
||||||
|
val f = new MyTypedActorWithDualCounterFormat
|
||||||
|
val bytes = toBinaryJ(typedActor1, f)
|
||||||
|
val typedActor2: MyTypedActor = fromBinaryJ(bytes, f)
|
||||||
|
typedActor2.requestReply("hello") should equal("world 3 3")
|
||||||
|
}
|
||||||
|
|
||||||
|
it("should be able to serialize a local yped actor ref to a remote typed actor ref proxy") {
|
||||||
|
val typedActor1 = TypedActor.newInstance(classOf[MyTypedActor], classOf[MyStatelessTypedActorImpl], 1000)
|
||||||
|
typedActor1.requestReply("hello") should equal("world")
|
||||||
|
typedActor1.requestReply("hello") should equal("world")
|
||||||
|
|
||||||
|
val bytes = RemoteTypedActorSerialization.toBinary(typedActor1)
|
||||||
|
val typedActor2: MyTypedActor = RemoteTypedActorSerialization.fromBinaryToRemoteTypedActorRef(bytes)
|
||||||
|
typedActor1.requestReply("hello") should equal("world")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
trait MyTypedActor {
|
||||||
|
def requestReply(s: String) : String
|
||||||
|
def oneWay() : Unit
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyTypedActorImpl extends TypedActor with MyTypedActor {
|
||||||
|
var count = 0
|
||||||
|
|
||||||
|
override def oneWay() {
|
||||||
|
println("got oneWay message")
|
||||||
|
}
|
||||||
|
|
||||||
|
override def requestReply(message: String) : String = {
|
||||||
|
count = count + 1
|
||||||
|
if (message == "hello") {
|
||||||
|
"world " + count
|
||||||
|
} else ("hello " + message + " " + count)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyTypedActorWithDualCounter extends TypedActor with MyTypedActor {
|
||||||
|
var count1 = 0
|
||||||
|
var count2 = 0
|
||||||
|
|
||||||
|
override def oneWay() {
|
||||||
|
println("got oneWay message")
|
||||||
|
}
|
||||||
|
|
||||||
|
override def requestReply(message: String) : String = {
|
||||||
|
count1 = count1 + 1
|
||||||
|
count2 = count2 + 1
|
||||||
|
|
||||||
|
if (message == "hello") {
|
||||||
|
"world " + count1 + " " + count2
|
||||||
|
} else ("hello " + message + " " + count1 + " " + count2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyStatelessTypedActorImpl extends TypedActor with MyTypedActor {
|
||||||
|
|
||||||
|
override def oneWay() {
|
||||||
|
println("got oneWay message")
|
||||||
|
}
|
||||||
|
|
||||||
|
override def requestReply(message: String) : String = {
|
||||||
|
if (message == "hello") "world" else ("hello " + message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -390,11 +390,22 @@ object TypedActor extends Logging {
|
||||||
if (config._messageDispatcher.isDefined) actorRef.dispatcher = config._messageDispatcher.get
|
if (config._messageDispatcher.isDefined) actorRef.dispatcher = config._messageDispatcher.get
|
||||||
if (config._threadBasedDispatcher.isDefined) actorRef.dispatcher = Dispatchers.newThreadBasedDispatcher(actorRef)
|
if (config._threadBasedDispatcher.isDefined) actorRef.dispatcher = Dispatchers.newThreadBasedDispatcher(actorRef)
|
||||||
if (config._host.isDefined) actorRef.makeRemote(config._host.get)
|
if (config._host.isDefined) actorRef.makeRemote(config._host.get)
|
||||||
|
actorRef.timeout = config.timeout
|
||||||
AspectInitRegistry.register(proxy, AspectInit(intfClass, typedActor, actorRef, config._host, config.timeout))
|
AspectInitRegistry.register(proxy, AspectInit(intfClass, typedActor, actorRef, config._host, config.timeout))
|
||||||
actorRef.start
|
actorRef.start
|
||||||
proxy.asInstanceOf[T]
|
proxy.asInstanceOf[T]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private[akka] def newInstance[T](intfClass: Class[T], actorRef: ActorRef): T = {
|
||||||
|
if (!actorRef.actorInstance.get.isInstanceOf[TypedActor]) throw new IllegalArgumentException("ActorRef is not a ref to a typed actor")
|
||||||
|
val typedActor = actorRef.actorInstance.get.asInstanceOf[TypedActor]
|
||||||
|
val proxy = Proxy.newInstance(Array(intfClass), Array(typedActor), true, false)
|
||||||
|
typedActor.initialize(proxy)
|
||||||
|
AspectInitRegistry.register(proxy, AspectInit(intfClass, typedActor, actorRef, actorRef.remoteAddress, actorRef.timeout))
|
||||||
|
actorRef.start
|
||||||
|
proxy.asInstanceOf[T]
|
||||||
|
}
|
||||||
|
|
||||||
private[akka] def newInstance[T](intfClass: Class[T], targetClass: Class[_],
|
private[akka] def newInstance[T](intfClass: Class[T], targetClass: Class[_],
|
||||||
remoteAddress: Option[InetSocketAddress], timeout: Long): T = {
|
remoteAddress: Option[InetSocketAddress], timeout: Long): T = {
|
||||||
val actorRef = actorOf(newTypedActor(targetClass))
|
val actorRef = actorOf(newTypedActor(targetClass))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue