< prev index next >

src/jdk.management.agent/share/classes/sun/management/jdp/JdpController.java

Print this page
rev 48930 : 8198539: Cleanup of unused imports in java/util/jar/Attributes.java (java.base) and JdpController.java (jdk.management.agent)
   1 /*
   2  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */

  25 package sun.management.jdp;
  26 
  27 import java.io.IOException;
  28 import java.net.InetAddress;
  29 import java.net.UnknownHostException;
  30 import java.util.UUID;
  31 
  32 import java.lang.management.ManagementFactory;
  33 import java.lang.management.RuntimeMXBean;
  34 import java.lang.reflect.Field;
  35 import java.lang.reflect.Method;
  36 import java.lang.UnsupportedOperationException;
  37 import sun.management.VMManagement;

  38 
  39 /**
  40  * JdpController is responsible to create and manage a broadcast loop.
  41  *
  42  * <p> Other part of code has no access to broadcast loop and have to use
  43  * provided static methods
  44  * {@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService}
  45  * and {@link #stopDiscoveryService() stopDiscoveryService}
  46  * <p>{@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService} could be called multiple
  47  * times as it stops the running service if it is necessary.
  48  * Call to {@link #stopDiscoveryService() stopDiscoveryService}
  49  * ignored if service isn't run.
  50  *
  51  *
  52  * <p> System properties below could be used to control broadcast loop behavior.
  53  * Property below have to be set explicitly in command line. It's not possible to
  54  * set it in management.config file.  Careless changes of these properties could
  55  * lead to security or network issues.
  56  * <ul>
  57  *     <li>com.sun.management.jdp.ttl         - set ttl for broadcast packet</li>


   1 /*
   2  * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.management.jdp;
  27 
  28 import java.io.IOException;




  29 import java.lang.management.ManagementFactory;
  30 import java.lang.management.RuntimeMXBean;
  31 import java.lang.reflect.Field;
  32 import java.lang.reflect.Method;
  33 import java.net.InetAddress;
  34 import java.net.UnknownHostException;
  35 import java.util.UUID;
  36 
  37 /**
  38  * JdpController is responsible to create and manage a broadcast loop.
  39  *
  40  * <p> Other part of code has no access to broadcast loop and have to use
  41  * provided static methods
  42  * {@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService}
  43  * and {@link #stopDiscoveryService() stopDiscoveryService}
  44  * <p>{@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService} could be called multiple
  45  * times as it stops the running service if it is necessary.
  46  * Call to {@link #stopDiscoveryService() stopDiscoveryService}
  47  * ignored if service isn't run.
  48  *
  49  *
  50  * <p> System properties below could be used to control broadcast loop behavior.
  51  * Property below have to be set explicitly in command line. It's not possible to
  52  * set it in management.config file.  Careless changes of these properties could
  53  * lead to security or network issues.
  54  * <ul>
  55  *     <li>com.sun.management.jdp.ttl         - set ttl for broadcast packet</li>


< prev index next >