/** * NOTE: synchronization guarantees that <code>transport</code> is non-<code>null</code> and <code>state == CONNECTED</code>. * @see gov.aps.jca.Channel#getHostName() */ public synchronized String getHostName() throws IllegalStateException { connectionRequiredCheck(); return transport.getRemoteAddress().getHostName(); }
/** * NOTE: synchronization guarantees that <code>transport</code> is non-<code>null</code> and <code>state == CONNECTED</code>. * @see gov.aps.jca.Channel#getHostName() */ public synchronized String getHostName() throws IllegalStateException { connectionRequiredCheck(); return transport.getRemoteAddress().getHostName(); }
/** * Modifies client username and notifies connected servers about it. */ public void modifyUserName(String userName) { if (userName == null) throw new NullPointerException("userName == null"); this.userName = userName; Transport[] transports = getTransportRegistry().toArray(); for (int i = 0; i < transports.length; i++) { CATransport transport = (CATransport)transports[i]; try { transport.updateUserName(); } catch (Throwable th) { logger.log(Level.WARNING, "Failed to update username for transport: " + transport.getRemoteAddress(), th); } } }
if (!transport.getRemoteAddress().equals(serverAddress))
if (!transport.getRemoteAddress().equals(serverAddress))