code: public void addSocketBinding(String socketBindingGroupName, String socketBindingName, String sysPropName, int port)
          throws Exception {
  
          if (isSocketBinding(socketBindingGroupName, socketBindingName)) {
              return;
          }
  
          String portValue;
          if (sysPropName != null) {
              portValue = "${" + sysPropName + ":" + port + "}";
          } else {
              portValue = String.valueOf(port);
          }
  
          Address addr = Address.root().add(SOCKET_BINDING_GROUP, socketBindingGroupName, SOCKET_BINDING,
              socketBindingName);
          final ModelNode request = new ModelNode();
          setPossibleExpression(request, PORT, portValue);
          request.get(OPERATION).set(ADD);
          request.get(ADDRESS).set(addr.getAddressNode());
  
          ModelNode results = execute(request);
          if (!isSuccess(results)) {
              throw new FailureException(results);
          }
          return; // everything is OK
      }
docs: Adds a socket binding with the given name in the named socket binding group.
  If sysPropName is null, this simply sets the port number explicitly to the given port number.
  If sysPropName is not null, this sets the port to the expression "${sysPropName:port}".
  
  If a socket binding with the given name already exists, this method does nothing.
  
  @param socketBindingGroupName the name of the socket binding group in which to create the named socket binding
  @param socketBindingName the name of the socket binding to be created with the given port
  @param sysPropName the name of the system property whose value is to be the port number
  @param port the default port number if the sysPropName is not defined
  @throws Exception any error