Пример #1
0
 @Override
 void execute(final ModelNode operation, final SocketBinding binding, final ModelNode result) {
   ManagedBinding managedBinding = binding.getManagedBinding();
   if (managedBinding != null) {
     int port = managedBinding.getBindAddress().getPort();
     result.set(port);
   }
 }
Пример #2
0
 @Override
 void execute(final ModelNode operation, final SocketBinding binding, final ModelNode result) {
   ManagedBinding managedBinding = binding.getManagedBinding();
   if (managedBinding != null) {
     InetAddress addr = managedBinding.getBindAddress().getAddress();
     result.set(addr.getHostAddress());
   }
 }