Package org.apache.vysper.xmpp.protocol

Examples of org.apache.vysper.xmpp.protocol.SessionStateHolder


            return;
        }

        Stanza stanza = (Stanza) message;
        SessionContext session = extractSession(ioSession);
        SessionStateHolder stateHolder = (SessionStateHolder) ioSession
                .getAttribute(ATTRIBUTE_VYSPER_SESSIONSTATEHOLDER);

        serverRuntimeContext.getStanzaProcessor().processStanza(serverRuntimeContext, session, stanza, stateHolder);
    }
View Full Code Here


    }

    private void messageReceivedNoStanza(IoSession ioSession, Object message) {
        if (message == SslFilter.SESSION_SECURED) {
            SessionContext session = extractSession(ioSession);
            SessionStateHolder stateHolder = (SessionStateHolder) ioSession
                    .getAttribute(ATTRIBUTE_VYSPER_SESSIONSTATEHOLDER);
            serverRuntimeContext.getStanzaProcessor().processTLSEstablished(session, stateHolder);
            return;
        } else if (message == SslFilter.SESSION_UNSECURED) {
            // TODO
View Full Code Here

    public void messageSent(IoSession ioSession, Object o) throws Exception {
        // TODO implement
    }

    public void sessionCreated(IoSession ioSession) throws Exception {
        SessionStateHolder stateHolder = new SessionStateHolder();
        SessionContext sessionContext = new MinaBackedSessionContext(serverRuntimeContext, stateHolder, ioSession);
        ioSession.setAttribute(ATTRIBUTE_VYSPER_SESSION, sessionContext);
        ioSession.setAttribute(ATTRIBUTE_VYSPER_SESSIONSTATEHOLDER, stateHolder);
    }
View Full Code Here

     * creates a new session context (but doesn't set the runtime context)
     * @param entity
     * @return
     */
    public static TestSessionContext createSessionContext(Entity entity) {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        TestSessionContext sessionContext = new TestSessionContext(sessionStateHolder);
        if (entity != null)
            sessionContext.setInitiatingEntity(entity.getBareJID());
        return sessionContext;
    }
View Full Code Here

    /**
     * creates a new authenticated session and a new runtime context
     * @return
     */
    public static TestSessionContext createWithStanzaReceiverRelayAuthenticated() {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        sessionStateHolder.setState(SessionState.AUTHENTICATED);
        return createWithStanzaReceiverRelay(sessionStateHolder);
    }
View Full Code Here

     * creates a new session context (but doesn't set the runtime context)
     * @param entity
     * @return
     */
    public static TestSessionContext createSessionContext(Entity entity) {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        TestSessionContext sessionContext = new TestSessionContext(sessionStateHolder);
        if (entity != null)
            sessionContext.setInitiatingEntity(entity.getBareJID());
        return sessionContext;
    }
View Full Code Here

    /**
     * creates a new authenticated session and a new runtime context
     * @return
     */
    public static TestSessionContext createWithStanzaReceiverRelayAuthenticated() {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        sessionStateHolder.setState(SessionState.AUTHENTICATED);
        return createWithStanzaReceiverRelay(sessionStateHolder);
    }
View Full Code Here

        handler = getHandler();
    }

    protected TestSessionContext createTestSessionContext(Entity serverEntity) {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        sessionStateHolder.setState(SessionState.AUTHENTICATED);
        relay = new org.apache.vysper.xmpp.delivery.StanzaReceiverRelay();
        DefaultServerRuntimeContext serverContext = new DefaultServerRuntimeContext(serverEntity, relay);
        relay.setServerRuntimeContext(serverContext);
        TestSessionContext tsc = new TestSessionContext(serverContext, sessionStateHolder);
View Full Code Here

     * creates a new session context (but doesn't set the runtime context)
     * @param entity
     * @return
     */
    public static TestSessionContext createSessionContext(Entity entity) {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        TestSessionContext sessionContext = new TestSessionContext(sessionStateHolder);
        if (entity != null)
            sessionContext.setInitiatingEntity(entity.getBareJID());
        return sessionContext;
    }
View Full Code Here

    /**
     * creates a new authenticated session and a new runtime context
     * @return
     */
    public static TestSessionContext createWithStanzaReceiverRelayAuthenticated() {
        SessionStateHolder sessionStateHolder = new SessionStateHolder();
        sessionStateHolder.setState(SessionState.AUTHENTICATED);
        return createWithStanzaReceiverRelay(sessionStateHolder);
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.protocol.SessionStateHolder

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.