if(channel != null) channel.send(msg); else if(adapter != null) { try { if(id != null) adapter.send(id, msg); else adapter.send(msg); } catch(Throwable ex) { if(log.isErrorEnabled()) log.error("exception=" + Util.print(ex)); } } else { if(log.isErrorEnabled()) log.error("channel == null"); } }
if (channel != null) { channel.send(msg); } else if (adapter != null) { try { if (id != null) { adapter.send(id, msg); } else { adapter.send(msg); } } catch (Throwable ex) { if (log.isErrorEnabled()) { log.error("exception=" + Util.print(ex)); } } } else { if (log.isErrorEnabled()) { log.error("channel == null"); } } }
    public void send(Message msg) throws ChannelNotConnectedException, ChannelClosedException {        if(channel != null)            channel.send(msg);        else if(adapter != null) {            try {                if(id != null)                    adapter.send(id, msg);                else                    adapter.send(msg);            }            catch(Throwable ex) {                if(log.isErrorEnabled()) log.error("exception=" + Util.print(ex));            }        }        else {            if(log.isErrorEnabled()) log.error("channel == null");        }    }