| | |
| | | |
| | | private boolean isAuthenticated; |
| | | |
| | | private static String hostName = "locahost"; |
| | | private static String localHostName = "locahost"; |
| | | static |
| | | { |
| | | try |
| | | { |
| | | hostName = java.net.InetAddress.getLocalHost().getHostName(); |
| | | localHostName = java.net.InetAddress.getLocalHost().getHostName(); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | } |
| | | }; |
| | | |
| | | private String hostName = localHostName; |
| | | |
| | | private boolean isLocal = true; |
| | | |
| | | /** |
| | | * Enumeration indicating the status of the server. |
| | | * |
| | |
| | | */ |
| | | STOPPING, |
| | | /** |
| | | * Not connected to remote. |
| | | */ |
| | | NOT_CONNECTED_TO_REMOTE, |
| | | /** |
| | | * Status Unknown. |
| | | */ |
| | | UNKNOWN |
| | |
| | | |
| | | if (equals) |
| | | { |
| | | equals = desc.isLocal() == isLocal(); |
| | | } |
| | | |
| | | if (equals) |
| | | { |
| | | equals = desc.isAuthenticated() == isAuthenticated(); |
| | | } |
| | | |
| | |
| | | |
| | | if (equals) |
| | | { |
| | | equals = desc.getInstallPath().equals(getInstallPath()); |
| | | if (desc.getInstallPath() == null) |
| | | { |
| | | equals = getInstallPath() == null; |
| | | } |
| | | else |
| | | { |
| | | equals = desc.getInstallPath().equals(getInstallPath()); |
| | | } |
| | | } |
| | | |
| | | if (equals) |
| | | { |
| | | equals = desc.getInstancePath().equals(getInstancePath()); |
| | | if (desc.getInstancePath() == null) |
| | | { |
| | | equals = getInstancePath() == null; |
| | | } |
| | | else |
| | | { |
| | | equals = desc.getInstancePath().equals(getInstancePath()); |
| | | } |
| | | } |
| | | |
| | | if (equals) |
| | |
| | | |
| | | if (equals) |
| | | { |
| | | equals = desc.getOpenDSVersion().equals(getOpenDSVersion()); |
| | | if (desc.getOpenDSVersion() == null) |
| | | { |
| | | equals = getOpenDSVersion() == null; |
| | | } |
| | | else |
| | | { |
| | | equals = desc.getOpenDSVersion().equals(getOpenDSVersion()); |
| | | } |
| | | } |
| | | |
| | | if (equals) |
| | |
| | | } |
| | | |
| | | /** |
| | | * Sets the host name of the server. |
| | | * @param hostName the host name of the server. |
| | | */ |
| | | public void setHostname(String hostName) |
| | | { |
| | | this.hostName = hostName; |
| | | } |
| | | |
| | | /** |
| | | * Returns <CODE>true</CODE> if we are trying to manage the local host and |
| | | * <CODE>false</CODE> otherwise. |
| | | * @return <CODE>true</CODE> if we are trying to manage the local host and |
| | | * <CODE>false</CODE> otherwise. |
| | | */ |
| | | public boolean isLocal() |
| | | { |
| | | return isLocal; |
| | | } |
| | | |
| | | /** |
| | | * Sets whether this server represents the local instance or a remote server. |
| | | * @param isLocal whether this server represents the local instance or a |
| | | * remote server (in another machine or in another installation on the same |
| | | * machine). |
| | | */ |
| | | public void setIsLocal(boolean isLocal) |
| | | { |
| | | this.isLocal = isLocal; |
| | | } |
| | | |
| | | /** |
| | | * Returns the exceptions that occurred while reading the configuration. |
| | | * @return the exceptions that occurred while reading the configuration. |
| | | */ |
| | |
| | | public void setAdminConnector(ConnectionHandlerDescriptor adminConnector) |
| | | { |
| | | this.adminConnector = adminConnector; |
| | | }/** |
| | | } |
| | | |
| | | /** |
| | | * Sets the monitoring entry for the entry caches. |
| | | * @param entryCaches the monitoring entry for the entry caches. |
| | | */ |