code: public static boolean isConditionSupported(XMPPConnection connection, String conditionName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          String featureName = AMPExtension.NAMESPACE + "?condition=" + conditionName;
          return isFeatureSupportedByServer(connection, featureName);
      }
docs: Check if server supports specified condition.
  @param connection active xmpp connection
  @param conditionName name of condition to check
  @return true if this condition is supported.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException
  @see AMPDeliverCondition
  @see AMPExpireAtCondition
  @see AMPMatchResourceCondition