Examples of IoEvent


Examples of org.apache.mina.core.session.IoEvent

        pushEvent(new IoEvent(IoEventType.MESSAGE_SENT, getSession(), request));
    }

    @Override
    public void fireSessionClosed() {
        pushEvent(new IoEvent(IoEventType.SESSION_CLOSED, getSession(), null));
    }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

        pushEvent(new IoEvent(IoEventType.SESSION_CLOSED, getSession(), null));
    }

    @Override
    public void fireSessionCreated() {
        pushEvent(new IoEvent(IoEventType.SESSION_CREATED, getSession(), null));
    }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

        pushEvent(new IoEvent(IoEventType.SESSION_CREATED, getSession(), null));
    }

    @Override
    public void fireSessionIdle(IdleStatus status) {
        pushEvent(new IoEvent(IoEventType.SESSION_IDLE, getSession(), status));
    }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

        pushEvent(new IoEvent(IoEventType.SESSION_IDLE, getSession(), status));
    }

    @Override
    public void fireSessionOpened() {
        pushEvent(new IoEvent(IoEventType.SESSION_OPENED, getSession(), null));
    }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

        pushEvent(new IoEvent(IoEventType.SESSION_OPENED, getSession(), null));
    }

    @Override
    public void fireMessageReceived(Object message) {
        pushEvent(new IoEvent(IoEventType.MESSAGE_RECEIVED, getSession(), message));
    }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

                    }
                    WriteRequest req;
                    long currentTime = System.currentTimeMillis();
                    while ((req = queue.poll(session)) != null) {
                        Object m = req.getMessage();
                        pushEvent(new IoEvent(IoEventType.MESSAGE_SENT, session, req), false);
                        session.getRemoteSession().getFilterChain().fireMessageReceived(
                                getMessageCopy(m));
                        if (m instanceof IoBuffer) {
                            session.increaseWrittenBytes0(
                                    ((IoBuffer) m).remaining(), currentTime);
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

        }

        // Check that it's a IoEvent task
        checkTaskType(task);

        IoEvent event = (IoEvent) task;
        IoSession session = event.getSession();
       
        // Get the session's queue of events
        Queue<Runnable> tasksQueue = getTasksQueue(session);
        boolean offerSession;
        boolean offerEvent = true;
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

     * {@inheritDoc}
     */
    @Override
    public boolean remove(Runnable task) {
        checkTaskType(task);
        IoEvent event = (IoEvent) task;
        IoSession session = event.getSession();
        Queue<Runnable> tasksQueue = (Queue<Runnable>)session.getAttribute(TASKS_QUEUE);
       
        if (tasksQueue == null) {
            return false;
        }
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

    @Override
    public void filterWrite(
            NextFilter nextFilter,
            IoSession session, WriteRequest writeRequest) throws Exception {

        final IoEvent e = new IoEvent(IoEventType.WRITE, session, writeRequest);

        if (queueHandler.accept(this, e)) {
            nextFilter.filterWrite(session, writeRequest);
            WriteFuture writeFuture = writeRequest.getFuture();
            if (writeFuture == null) {
View Full Code Here

Examples of org.apache.mina.core.session.IoEvent

            rejectTask(task);
        }

        checkTaskType(task);

        IoEvent e = (IoEvent) task;
        boolean offeredEvent = queueHandler.accept(this, e);
        if (offeredEvent) {
            getQueue().offer(e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.