if (!(returnValue instanceof TcpConnection)) {
return; // not expecting anything else, but let's no belabor the
// point...
}
TcpConnection conn = (TcpConnection) returnValue;
String host = conn.getHostAddress();
int port = conn.getPort();
op.put(HOST_ADDRESS_ATTR, host)
.put(PORT_ATTR, port)
.put(OperationFields.URI, "tcp://" + host + ":" + port)
.putAnyNonEmpty(CONNID_ATTR, conn.getConnectionId())
.put(SERVER_ATTR, conn.isServer());
}