| | |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | | import static org.forgerock.util.Utils.closeSilently; |
| | | |
| | | import java.io.*; |
| | | import java.net.InetSocketAddress; |
| | | import java.net.ServerSocket; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the default value for the JMX Port. |
| | | * @return the default value for the JMX Port. |
| | | */ |
| | | public static int getDefaultJMXPort() |
| | | { |
| | | return 1689; |
| | | } |
| | | |
| | | /** |
| | | * Indicates whether we are in a web start installation or not. |
| | | * |
| | | * @return <CODE>true</CODE> if we are in a web start installation and |
| | |
| | | } |
| | | finally |
| | | { |
| | | close(outputStream); |
| | | closeSilently(outputStream); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | close(outputStream); |
| | | closeSilently(outputStream); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | close(br); |
| | | closeSilently(br); |
| | | } |
| | | if (hostName == null) |
| | | { |
| | |
| | | } |
| | | return hostName; |
| | | } |
| | | |
| | | private static void close(Closeable toClose) |
| | | { |
| | | if (toClose != null) |
| | | { |
| | | try |
| | | { |
| | | toClose.close(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | // ignore |
| | | } |
| | | } |
| | | } |
| | | } |