@Test public void testIsSameInstance() throws Exception { SocketServerConnection conn = createConnection(null, new HostInfo("0.0.0.0", 1), new Properties()); SocketServerConnection conn1 = createConnection(null, new HostInfo("0.0.0.1", 1), new Properties()); assertFalse(conn.isSameInstance(conn1)); assertTrue(conn.isSameInstance(conn)); }
public boolean isSameInstance(ServerConnection otherService) throws CommunicationException { if (!(otherService instanceof SocketServerConnection)) { return false; } try { return selectServerInstance().getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance().getHostInfo()); } catch (ConnectionException e) { throw new CommunicationException(e); } }
SocketServerConnection implements ServerConnection { public boolean isSameInstance(ServerConnection otherService) throws CommunicationException { if (!(otherService instanceof SocketServerConnection)) { return false; } try { return selectServerInstance().getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance().getHostInfo()); } catch (ConnectionException e) { throw new CommunicationException(e); } } }
SocketServerConnection implements ServerConnection { public boolean isSameInstance(ServerConnection otherService) throws CommunicationException { if (!(otherService instanceof SocketServerConnection)) { return false; } try { return selectServerInstance().getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance().getHostInfo()); } catch (ConnectionException e) { throw new CommunicationException(e); } } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); }
SocketServerConnection implements ServerConnection { public boolean isSameInstance(ServerConnection otherService) throws CommunicationException { if (!(otherService instanceof SocketServerConnection)) { return false; } try { return selectServerInstance().getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance().getHostInfo()); } catch (ConnectionException e) { throw new CommunicationException(e); } } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); synchronized SocketServerInstance selectServerInstance(); static void updateConnectionProperties(Properties connectionProperties, InetAddress addr, boolean setMac, HostnameResolver resolver); T getService(Class<T> iface); synchronized void close(); boolean isOpen(long msToTest); LogonResult getLogonResult(); boolean isSameInstance(ServerConnection otherService); void setFailOver(boolean failOver); void setFailOverPingInterval(int pingFailOverInterval); @Override void authenticate(); @Override boolean supportsContinuous(); @Override boolean isLocal(); @Override String getServerVersion(); }
SocketServerConnection implements ServerConnection { public boolean isSameInstance(ServerConnection otherService) throws CommunicationException { if (!(otherService instanceof SocketServerConnection)) { return false; } try { return selectServerInstance().getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance().getHostInfo()); } catch (ConnectionException e) { throw new CommunicationException(e); } } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); synchronized SocketServerInstance selectServerInstance(); static void updateConnectionProperties(Properties connectionProperties, InetAddress addr, boolean setMac, HostnameResolver resolver); T getService(Class<T> iface); synchronized void close(); boolean isOpen(long msToTest); LogonResult getLogonResult(); boolean isSameInstance(ServerConnection otherService); void setFailOver(boolean failOver); void setFailOverPingInterval(int pingFailOverInterval); @Override void authenticate(); @Override boolean supportsContinuous(); @Override boolean isLocal(); @Override String getServerVersion();  }