コード例 #1
0
 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);
   }
 }
コード例 #2
0
 public Address getAddress() {
   final ActorRefProvider provider = system.provider();
   if (provider instanceof RemoteActorRefProvider) {
     return ((RemoteActorRefProvider) provider).transport().address();
   } else {
     throw new UnsupportedOperationException("need RemoteActorRefProvider");
   }
 }