Esempio n. 1
0
 public AkkaProtocolTransport(Transport wrappedTransport, ActorSystem actorSystem,
     AkkaProtocolSettings akkaProtocolSettings)
 {
     Transport = wrappedTransport;
     this.actorSystem = actorSystem;
     this.akkaProtocolSettings = akkaProtocolSettings;
 }
Esempio n. 2
0
        private Akka.Remote.Transport.Transport WrapTransport(Akka.Remote.Transport.Transport transport)
        {
            if (withAkkaProtocol) {
                var provider = (RemoteActorRefProvider)((ExtendedActorSystem)Sys).Provider;

                return new AkkaProtocolTransport(transport, Sys, new AkkaProtocolSettings(provider.RemoteSettings.Config), new AkkaPduProtobuffCodec(Sys));
            }

            return transport;
        }
Esempio n. 3
0
        public EndpointActor(Address localAddress, Address remoteAddress, Transport.Transport transport,
            RemoteSettings settings)
        {
            this.localAddress = localAddress;
            this.remoteAddress = remoteAddress;
            this.transport = transport;
            this.settings = settings;

            client = new TcpClient();
            client.Connect(remoteAddress.Host, remoteAddress.Port.Value);
            stream = client.GetStream();
        }
Esempio n. 4
0
 public Transport Create(Transport wrappedTransport, ExtendedActorSystem system)
 {
     return new FailureInjectorTransportAdapter(wrappedTransport, system);
 }
Esempio n. 5
0
 public FailureInjectorTransportAdapter(Transport wrappedTransport, ExtendedActorSystem extendedActorSystem) : base(wrappedTransport)
 {
     ExtendedActorSystem = extendedActorSystem;
     _log = Logging.GetLogger(ExtendedActorSystem, this);
     _shouldDebugLog = ExtendedActorSystem.Settings.Config.GetBoolean("akka.remote.gremlin.debug");
 }
Esempio n. 6
0
 protected AbstractTransportAdapter(Transport wrappedTransport)
 {
     WrappedTransport = wrappedTransport;
 }
Esempio n. 7
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="wrappedTransport">TBD</param>
 /// <param name="system">TBD</param>
 protected ActorTransportAdapter(Transport wrappedTransport, ActorSystem system) : base(wrappedTransport)
 {
     System = system;
 }
Esempio n. 8
0
 public AkkaProtocolTransport(Transport wrappedTransport, ActorSystem system, AkkaProtocolSettings settings, AkkaPduCodec codec)
     : base(wrappedTransport, system)
 {
     Codec    = codec;
     Settings = settings;
 }
Esempio n. 9
0
 /// <summary>
 /// Constructor for outbound ProtocolStateActors
 /// </summary>
 public ProtocolStateActor(HandshakeInfo handshakeInfo, Address remoteAddress,
                           TaskCompletionSource <AssociationHandle> statusCompletionSource, Transport transport,
                           AkkaProtocolSettings settings, AkkaPduCodec codec, FailureDetector failureDetector, int?refuseUid = null)
     : this(
         new OutboundUnassociated(remoteAddress, statusCompletionSource, transport), handshakeInfo, settings, codec, failureDetector,
         refuseUid)
 {
 }
Esempio n. 10
0
 public OutboundUnassociated(Address remoteAddress, TaskCompletionSource <AssociationHandle> statusCompletionSource, Transport transport)
 {
     Transport = transport;
     StatusCompletionSource = statusCompletionSource;
     RemoteAddress          = remoteAddress;
 }
Esempio n. 11
0
 public AkkaProtocolManager(Transport wrappedTransport, AkkaProtocolSettings settings)
 {
     _wrappedTransport = wrappedTransport;
     _settings         = settings;
 }
Esempio n. 12
0
 public static Props OutboundProps(HandshakeInfo handshakeInfo, Address remoteAddress,
                                   TaskCompletionSource <AssociationHandle> statusCompletionSource,
                                   Transport transport, AkkaProtocolSettings settings, AkkaPduCodec codec, FailureDetector failureDetector, int?refuseUid = null)
 {
     return(Props.Create(() => new ProtocolStateActor(handshakeInfo, remoteAddress, statusCompletionSource, transport, settings, codec, failureDetector, refuseUid)));
 }
Esempio n. 13
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="wrappedTransport">TBD</param>
 /// <param name="system">TBD</param>
 /// <returns>TBD</returns>
 public Transport Create(Transport wrappedTransport, ExtendedActorSystem system)
 {
     return(new FailureInjectorTransportAdapter(wrappedTransport, system));
 }
Esempio n. 14
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="wrappedTransport">TBD</param>
 /// <param name="extendedActorSystem">TBD</param>
 public FailureInjectorTransportAdapter(Transport wrappedTransport, ExtendedActorSystem extendedActorSystem) : base(wrappedTransport)
 {
     ExtendedActorSystem = extendedActorSystem;
     _log            = Logging.GetLogger(ExtendedActorSystem, this);
     _shouldDebugLog = ExtendedActorSystem.Settings.Config.GetBoolean("akka.remote.gremlin.debug");
 }
Esempio n. 15
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="wrappedTransport">TBD</param>
 /// <param name="system">TBD</param>
 public ThrottleTransportAdapter(Transport wrappedTransport, ActorSystem system) : base(wrappedTransport, system)
 {
 }
Esempio n. 16
0
 /// <inheritdoc cref="ITransportAdapterProvider"/>
 public Transport Create(Transport wrappedTransport, ExtendedActorSystem system)
 {
     return(new ThrottleTransportAdapter(wrappedTransport, system));
 }