code: public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString();
          return isFeatureSupportedByServer(connection, featureName);
      }
docs: Check if server supports specified action.
  @param connection active xmpp connection
  @param action action to check
  @return true if this action is supported.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException