Search in sources :

Example 1 with ChunkedFramingMechanismEncoder

use of org.opendaylight.netconf.nettyutil.handler.ChunkedFramingMechanismEncoder in project netconf by opendaylight.

the class Netconf539Test method testGetSessionForHelloMessage.

private void testGetSessionForHelloMessage(final String fileName) throws Exception {
    final Document helloDocument = XmlFileLoader.xmlFileToDocument(fileName);
    negotiator.startNegotiation();
    final NetconfHelloMessage helloMessage = new NetconfHelloMessage(helloDocument);
    final AbstractNetconfSession session = negotiator.getSessionForHelloMessage(helloMessage);
    Assert.assertNotNull(session);
    Assert.assertTrue("NetconfChunkAggregator was not installed in the Netconf pipeline", channel.pipeline().get(NETCONF_MESSAGE_AGGREGATOR) instanceof NetconfChunkAggregator);
    Assert.assertTrue("ChunkedFramingMechanismEncoder was not installed in the Netconf pipeline", channel.pipeline().get(NETCONF_MESSAGE_FRAME_ENCODER) instanceof ChunkedFramingMechanismEncoder);
}
Also used : ChunkedFramingMechanismEncoder(org.opendaylight.netconf.nettyutil.handler.ChunkedFramingMechanismEncoder) NetconfChunkAggregator(org.opendaylight.netconf.nettyutil.handler.NetconfChunkAggregator) NetconfHelloMessage(org.opendaylight.netconf.api.messages.NetconfHelloMessage) Document(org.w3c.dom.Document)

Aggregations

NetconfHelloMessage (org.opendaylight.netconf.api.messages.NetconfHelloMessage)1 ChunkedFramingMechanismEncoder (org.opendaylight.netconf.nettyutil.handler.ChunkedFramingMechanismEncoder)1 NetconfChunkAggregator (org.opendaylight.netconf.nettyutil.handler.NetconfChunkAggregator)1 Document (org.w3c.dom.Document)1