Examples of nextMessage()


Examples of org.jgroups.auth.sasl.SaslContext.nextMessage()

                case CHALLENGE:
                    try {
                        if (log.isTraceEnabled())
                            log.trace("%s: received CHALLENGE from %s", getAddress(), remoteAddress);
                        // the response computed can be null if the challenge-response cycle has ended
                        Message response = saslContext.nextMessage(remoteAddress, saslHeader);
                        if (response != null) {
                            if (log.isTraceEnabled())
                                log.trace("%s: sending RESPONSE to %s", getAddress(), remoteAddress);
                            down_prot.down(new Event(Event.MSG, response));
                        } else {
View Full Code Here

Examples of org.jgroups.auth.sasl.SaslContext.nextMessage()

                    break;
                case RESPONSE:
                    try {
                        if (log.isTraceEnabled())
                            log.trace("%s: received RESPONSE from %s", getAddress(), remoteAddress);
                        Message challenge = saslContext.nextMessage(remoteAddress, saslHeader);
                        // the challenge computed can be null if the challenge-response cycle has ended
                        if (challenge != null) {
                            if (log.isTraceEnabled())
                                log.trace("%s: sending CHALLENGE to %s", getAddress(), remoteAddress);
View Full Code Here

Examples of org.jgroups.auth.sasl.SaslServerContext.nextMessage()

            Address remoteAddress = msg.getSrc();
            SaslServerContext ctx = null;
            try {
                ctx = new SaslServerContext(saslServerFactory, mech, server_name != null ? server_name : local_addr.toString(), server_callback_handler, sasl_props, server_subject);
                sasl_context.put(remoteAddress, ctx);
                this.getDownProtocol().down(new Event(Event.MSG, ctx.nextMessage(remoteAddress, saslHeader)));
                ctx.awaitCompletion(timeout);
                if (ctx.isSuccessful()) {
                    if (log.isDebugEnabled()) {
                        log.debug("Authentication successful for %s", ctx.getAuthorizationID());
                    }
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

        return dbuff;
    }

    public void testEmptyMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.EMPTY_MESSAGE);
        assertTrue("Initial message", buff.nextMessage());
        assertTrue("Initial part", buff.nextPart());
        assertEquals("Wrong offset", DimeCommon.HEADER_SIZE, buff.getOffset());
        assertEquals("Wrong limit", DimeCommon.HEADER_SIZE, buff.getLimit());
        assertFalse("No data in message", buff.require(1));
        assertFalse("No more parts in message", buff.nextPart());
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

        assertTrue("Initial part", buff.nextPart());
        assertEquals("Wrong offset", DimeCommon.HEADER_SIZE, buff.getOffset());
        assertEquals("Wrong limit", DimeCommon.HEADER_SIZE, buff.getLimit());
        assertFalse("No data in message", buff.require(1));
        assertFalse("No more parts in message", buff.nextPart());
        assertFalse("No more messages", buff.nextMessage());
    }

    public void testBadVersionMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.BAD_VERSION_MESSAGE);
        try {
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

    }

    public void testBadVersionMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.BAD_VERSION_MESSAGE);
        try {
            assertTrue("Initial message", buff.nextMessage());
            buff.nextPart();
            fail();
        } catch (IOException e) {
        }
    }
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

    }

    public void testNotFirstMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.NOT_FIRST_MESSAGE);
        try {
            assertTrue("Initial message", buff.nextMessage());
            buff.nextPart();
            fail();
        } catch (IOException e) {
        }
    }
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

        }
    }

    public void testNotLastMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.NOT_LAST_MESSAGE);
        assertTrue("Initial message", buff.nextMessage());
        assertTrue("Initial part", buff.nextPart());
        try {
            buff.nextPart();
            fail();
        } catch (IOException e) {
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

        }
    }

    public void testChunkedNoChunkMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.CHUNKED_NOCHUNK_MESSAGE);
        assertTrue("Initial message", buff.nextMessage());
        assertTrue("Initial part", buff.nextPart());
        try {
            buff.require(1);
            fail();
        } catch (IOException e) {
View Full Code Here

Examples of org.jibx.ws.encoding.dime.DimeInputBuffer.nextMessage()

        }
    }

    public void testOptIdTypeOnlyMessage() throws Exception {
        DimeInputBuffer buff = messageBuffer(TestData.OPTIDTYPEONLY_MESSAGE);
        assertTrue("Initial message", buff.nextMessage());
        assertTrue("Initial part", buff.nextPart());
        assertEquals("Record id", "bc", buff.getPartIdentifier());
        assertEquals("Record type", DimeCommon.TYPE_MEDIA, buff.getPartTypeCode());
        assertEquals("Record type text", "def", buff.getPartTypeText());
    }
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.