Therefore, you'll need to check for upper and lower bounds, and probably include an IllegalArgumentException if an invalid value appears.
因此,您需要检测上界和下界,在出现无效值的时候,可能还要包含一个IllegalArgumentException。
If the setter for a read-write property throws an exception (such as IllegalArgumentException), JMX reports the exception back to the client.
如果读写属性的setter抛出异常(例如IllegalArgumentException),JMX就把异常报告给客户机。
IllegalArgumentException - if the port parameter is outside the specified range of valid port values.
如果端口号超出指定的有效端口值范围时抛出。
应用推荐