Package org.glassfish.grizzly.asyncqueue

Examples of org.glassfish.grizzly.asyncqueue.WritableMessage


    @Override
    @SuppressWarnings("unchecked")
    public NextAction handleWrite(final FilterChainContext ctx)
            throws IOException {
        final WritableMessage message = ctx.getMessage();
        if (message != null) {
            ctx.setMessage(null);
            final Connection connection = ctx.getConnection();
            final FilterChainContext.TransportContext transportContext =
                    ctx.getTransportContext();
View Full Code Here


    @Override
    @SuppressWarnings("unchecked")
    protected long write0(final NIOConnection connection,
            final AsyncWriteQueueRecord queueRecord) throws IOException {
        final WritableMessage outputMessage = queueRecord.getMessage();
        final SocketAddress dstAddress = (SocketAddress) queueRecord.getDstAddress();
        final WriteResult<WritableMessage, SocketAddress> currentResult = queueRecord.getCurrentResult();
        return ((UDPNIOTransport) transport).write((UDPNIOConnection) connection,
                dstAddress, outputMessage, currentResult);
    }
View Full Code Here

    }

    @Override
    public NextAction handleWrite(final FilterChainContext ctx)
            throws IOException {
        final WritableMessage message = ctx.getMessage();
        if (message != null) {
            ctx.setMessage(null);
            final Connection connection = ctx.getConnection();
            final FilterChainContext.TransportContext transportContext =
                    ctx.getTransportContext();
View Full Code Here

        @SuppressWarnings("unchecked")
        public NextAction handleWrite(final FilterChainContext ctx) throws IOException {
            final Plug plug = plugAttr.get(ctx);
            // check if the output plug is installed
            if (plug != null && plug.isPlugged) {
                final WritableMessage msg = ctx.getMessage();
                // check if the message could be appended
                if (!msg.isExternal()) {
                    final Buffer buf = (Buffer) msg;
                   
                    // if there's MessageCloner - call it,
                    // because the caller is not aware of buffering and will expect
                    // some result (either buffer is written or queued),
View Full Code Here

            return writeComposite0(connection, (CompositeQueueRecord) queueRecord);
        }
       
        final WriteResult<WritableMessage, SocketAddress> currentResult =
                queueRecord.getCurrentResult();
        final WritableMessage message = queueRecord.getMessage();

        final long written;

        if (message instanceof Buffer) {
            final Buffer buffer = (Buffer) message;
View Full Code Here

        @Override
        public NextAction handleWrite(final FilterChainContext ctx) throws IOException {
            final Plug plug = plugAttr.get(ctx);
            // check if the output plug is installed
            if (plug != null && plug.isPlugged) {
                final WritableMessage msg = ctx.getMessage();
                // check if the message could be appended
                if (!msg.isExternal()) {
                    final Buffer buf = (Buffer) msg;
                   
                    // if there's MessageCloner - call it,
                    // because the caller is not aware of buffering and will expect
                    // some result (either buffer is written or queued),
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.asyncqueue.WritableMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.