public boolean isConnected(short nodeId){
  NodeConnection nc=connections.get(nodeId);
  return (nc != null && nc.state == NodeConnectionState.CONNECTED);
}

public boolean isConnected ( short nodeId ) { NodeConnection nc = connections . get ( nodeId ) ; return ( nc != null && nc . state == NodeConnectionState . CONNECTED ) ; }
find out if a particular node is connected
