code: public static ConstraintSecurityHandler getConstraintSecurityHandlerConfidential() {
          Constraint constraint = new Constraint();
          constraint.setDataConstraint(Constraint.DC_CONFIDENTIAL);
  
          ConstraintMapping constraintMapping = new ConstraintMapping();
          constraintMapping.setConstraint(constraint);
          constraintMapping.setPathSpec("/*");
  
          ConstraintSecurityHandler constraintSecurityHandler = new ConstraintSecurityHandler();
          constraintSecurityHandler.addConstraintMapping(constraintMapping);
  
          return constraintSecurityHandler;
      }
docs: Create constraint which redirect to Secure Port
  
  @return ConstraintSecurityHandler