public Address getAddressFor(Address remoteAddress) { final scala.Option<Address> optAddr = system.provider().getExternalAddressFor(remoteAddress); if (optAddr.isDefined()) { return optAddr.get(); } else { throw new UnsupportedOperationException("cannot send to remote address " + remoteAddress); } }
public Address getAddress() { final ActorRefProvider provider = system.provider(); if (provider instanceof RemoteActorRefProvider) { return ((RemoteActorRefProvider) provider).transport().address(); } else { throw new UnsupportedOperationException("need RemoteActorRefProvider"); } }