Code example for ConcurrentLinkedQueue

Methods: isEmpty

0
        return outbound.poll();
    } 
 
    protected boolean hasPending() 
    { 
        return !outbound.isEmpty();
    } 
 
    public void send( ByteBuffer data )
    {    
        if( data == null ) {
            throw new IllegalArgumentException( "Data cannot be null." );
        } 
        if( closing ) {
            throw new KernelException( "Endpoint has been closed:" + socket );
        } 
        send( data, true, true );
    } 
 
    public String toString()
    {