public void activate(ServiceID[] serviceIDs) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException { if (serviceIDs.length == 0) { throw new InvalidArgumentException("InvalidArgumentException"); } for (int i = 0; i < serviceIDs.length; i++) { if (serviceIDs[i] == null) { throw new InvalidArgumentException("InvalidArgumentException"); } } for (int i = 0; i < serviceIDs.length - 1; i++) for (int j = i + 1; j < serviceIDs.length; j++) if (serviceIDs[i] == (serviceIDs[j])) { throw new InvalidArgumentException( "InvalidArgumentException"); } for (int i = 0; i < serviceIDs.length; i++) { activate(serviceIDs[i]); } }
public void execute() { try { ts.setTracerLevel(oldLevel, tracerName); } catch (InvalidArgumentException e) { logger.error(e.getMessage(),e); } } };
private void validateNewEntityOrLinkName(String name) throws InvalidArgumentException { for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (!Character.isLetterOrDigit(c)) { if (c < '\u0020' || c > '\u007e') { throw new InvalidArgumentException( name + " includes char " + c + " ,which is not a letter or digit or in unicode range 0x0020-0x007e"); } } } }
public void execute() { try { ts.setTracerLevel(oldLevel, tracerName); } catch (InvalidArgumentException e) { logger.error(e.getMessage(),e); } } };
public String[] getUsageParameterSets(String arg0) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException { if (arg0 == null) { throw new NullPointerException(); } if (arg0.equals(DUMMY_SUBSYSTEM)) { throw new InvalidArgumentException(); } else { throw new UnrecognizedSubsystemException(); } }
public ObjectName getUsageNotificationManagerMBean(String arg0) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException { if (arg0 == null) { throw new NullPointerException(); } if (arg0.equals(DUMMY_SUBSYSTEM)) { throw new InvalidArgumentException(); } else { throw new UnrecognizedSubsystemException(); } }
throw new InvalidArgumentException("The parameter array(s) must not be empty."); throw new InvalidArgumentException("The parameter arrays must have same lenght."); throw new InvalidArgumentException("Null entry found in parameter array(s)."); throw new InvalidArgumentException("Repeated entry found in parameter array(s).");
public ObjectName getUsageMBean(String arg0) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, ManagementException { if (arg0 == null) { throw new NullPointerException(); } if (arg0.equals(DUMMY_SUBSYSTEM)) { throw new InvalidArgumentException(); } else { throw new UnrecognizedSubsystemException(); } }
/** * Return the set of named usage parameter names as an array. * * @param sbbId -- * sbb id for which to get the usage parameter set. * @return */ public String[] getNamedUsageParameterSets(SbbID sbbId) throws InvalidArgumentException { HashSet paramSet = (HashSet) this.usageParameterNames.get(sbbId.toString()); String[] retval = null; if (paramSet != null) { retval = new String[paramSet.size()]; paramSet.toArray(retval); return retval; } else throw new InvalidArgumentException ( "No named usage parameters for this sbb " + sbbId); } /**
public ObjectName getUsageMBean(String arg0, String arg1) throws NullPointerException, UnrecognizedSubsystemException, InvalidArgumentException, UnrecognizedUsageParameterSetNameException, ManagementException { if (arg0 == null) { throw new NullPointerException(); } if (arg0.equals(DUMMY_SUBSYSTEM)) { throw new InvalidArgumentException(); } else { throw new UnrecognizedSubsystemException(); } }
throw new InvalidArgumentException("The service array is empty!"); for (int i = 0; i < arg0.length; i++) if (arg0[i] == null) throw new InvalidArgumentException("InvalidArgumentException"); throw new InvalidArgumentException("InvalidArgumentException"); for (int i = 0; i < arg0.length - 1; i++) for (int j = i + 1; j < arg0.length; j++) if (arg0[i] == (arg0[j])) throw new InvalidArgumentException("InvalidArgumentException"); for (int i = 0; i < arg1.length - 1; i++) for (int j = i + 1; j < arg1.length; j++) if (arg1[i] == (arg1[j])) throw new InvalidArgumentException("InvalidArgumentException"); throw new InvalidArgumentException( "InvalidArgumentException"); try {
public ObjectName getSbbUsageMBean(SbbID sbbId, String name) throws NullPointerException, UnrecognizedSbbException, InvalidArgumentException, UnrecognizedUsageParameterSetNameException, ManagementException { if (name == null) throw new NullPointerException("Sbb usage param set is null"); if (name.length() == 0) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); if (!isValidUsageParameterName(name)) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); return _getSbbUsageMBean(sbbId, name); }
public void createUsageParameterSet(SbbID sbbId, String name) throws NullPointerException, UnrecognizedSbbException, InvalidArgumentException, UsageParameterSetNameAlreadyExistsException, ManagementException { if (name == null) throw new NullPointerException("Sbb usage param set is null"); if (name.length() == 0) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); if (!isValidUsageParameterName(name)) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); _createUsageParameterSet(sbbId, name, true); }
public void removeUsageParameterSet(SbbID sbbId, String name) throws NullPointerException, UnrecognizedSbbException, InvalidArgumentException, UnrecognizedUsageParameterSetNameException, ManagementException { if (name == null) throw new NullPointerException("Sbb usage param set is null"); if (name.length() == 0) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); if (!isValidUsageParameterName(name)) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); _removeUsageParameterSet(sbbId, name); }
public void unsetTracerLevel(String tracerName) throws InvalidArgumentException { if (!isTracerDefined(tracerName)) { throw new InvalidArgumentException("No tracer definition with name: " + tracerName + ", for notification source: " + this.notificationSource + ". See section 13.3 of JSLEE 1.1 specs"); } TracerImpl tracer = this.tracers.get(tracerName); if (tracer.getParentTracerName() == null) { throw new InvalidArgumentException("Can not unset root tracer level for source: " + this.notificationSource + ". See section 13.3 of JSLEE 1.1 specs"); } tracer.unsetTraceLevel(); }
public void deactivate(ServiceID[] arg0) throws NullPointerException, InvalidArgumentException, UnrecognizedServiceException, InvalidStateException, ManagementException { if (arg0.length == 0) { throw new InvalidArgumentException("InvalidArgumentException"); } for (int i = 0; i < arg0.length; i++) { if (arg0[i] == null) { throw new InvalidArgumentException("InvalidArgumentException"); } } for (int i = 0; i < arg0.length - 1; i++) for (int j = i + 1; j < arg0.length; j++) if (arg0[i] == (arg0[j])) { throw new InvalidArgumentException( "InvalidArgumentException"); } try { for (int i = 0; i < arg0.length; i++) { deactivate(arg0[i]); } } catch (InvalidStateException ise) { throw ise; } catch (Exception ex) { throw new ManagementException("system exception starting service", ex); } }
if (serviceIDs.length == 0) throw new InvalidArgumentException("InvalidArgumentException"); throw new InvalidArgumentException("InvalidArgumentException"); if (serviceIDs[i] == (serviceIDs[j])) throw new InvalidArgumentException("InvalidArgumentException");
throw new InvalidArgumentException("InvalidArgumentException"); throw new InvalidArgumentException("InvalidArgumentException"); if (arg0[i] == (arg0[j])) throw new InvalidArgumentException("InvalidArgumentException");
public void setTracerLevel(TraceLevel lvl, String tracerName) throws InvalidArgumentException { // FIXME: JDOC of TraceMBean - description of class show example // that setTraceLevel creates tracer, we handle creation elswhere if (!isTracerDefined(tracerName)) { throw new InvalidArgumentException("No tracer definition with name: " + tracerName + ", for notification source: " + this.notificationSource + ". See section 13.3 of JSLEE 1.1 specs"); } TracerImpl tracer = this.tracers.get(tracerName); if (tracer.getParentTracerName() == null) { throw new InvalidArgumentException("Can not set root tracer level for source: " + this.notificationSource + ". See section 13.3 of JSLEE 1.1 specs"); } tracer.setTraceLevel(lvl); }
/** * Creates the usage param (and its mbean) for the specified name * * @param paramSetName * @throws NullPointerException * @throws InvalidArgumentException * @throws UsageParameterSetNameAlreadyExistsException * @throws ManagementException */ public void createUsageParameterSet(String paramSetName) throws NullPointerException, InvalidArgumentException, UsageParameterSetNameAlreadyExistsException, ManagementException { if (paramSetName == null) throw new NullPointerException("usage param set is null"); if (paramSetName.length() == 0) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); if (!isValidUsageParameterName(paramSetName)) throw new InvalidArgumentException( "The lenght of the Usage Parameter Set Name is zero!"); _createUsageParameterSet(paramSetName); }