/** * Return the security constraints for this web application. * If there are none, a zero-length array is returned. * @return a string array with a representation of each * security constraint * @throws MBeanException propagated from the managed resource access */ public String[] findConstraints() throws MBeanException { Context context = doGetManagedResource(); SecurityConstraint[] constraints = context.findConstraints(); String[] stringConstraints = new String[constraints.length]; for (int counter = 0; counter < constraints.length; counter++) { stringConstraints[counter] = constraints[counter].toString(); } return stringConstraints; }
/** * Return the security constraints for this web application. * If there are none, a zero-length array is returned. * @return a string array with a representation of each * security constraint * @throws MBeanException propagated from the managed resource access */ public String[] findConstraints() throws MBeanException { Context context = doGetManagedResource(); SecurityConstraint[] constraints = context.findConstraints(); String[] stringConstraints = new String[constraints.length]; for (int counter = 0; counter < constraints.length; counter++) { stringConstraints[counter] = constraints[counter].toString(); } return stringConstraints; }
/** * Return the security constraints for this web application. * If there are none, a zero-length array is returned. */ public String[] findConstraints() throws MBeanException { Context context; try { context = (Context)getManagedResource(); } catch (InstanceNotFoundException e) { throw new MBeanException(e); } catch (RuntimeOperationsException e) { throw new MBeanException(e); } catch (InvalidTargetObjectTypeException e) { throw new MBeanException(e); } SecurityConstraint[] constraints = context.findConstraints(); String[] stringConstraints = new String[constraints.length]; for(int counter=0; counter < constraints.length; counter++){ stringConstraints[counter]=constraints[counter].toString(); } return stringConstraints; }