X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fcommons%2Fprotocol-framework%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fframework%2FSimpleSessionNegotiator.java;fp=opendaylight%2Fcommons%2Fprotocol-framework%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fframework%2FSimpleSessionNegotiator.java;h=39d5855bc078ba63719b40454e6aa3b277d18e56;hb=391180fcde6a7a2336182e346e24a1ff9f754062;hp=0000000000000000000000000000000000000000;hpb=1208cf638d47c7908604ab04eaf0e1dbaa67c9cb;p=controller.git diff --git a/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/SimpleSessionNegotiator.java b/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/SimpleSessionNegotiator.java new file mode 100644 index 0000000000..39d5855bc0 --- /dev/null +++ b/opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/SimpleSessionNegotiator.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.protocol.framework; + +import io.netty.channel.Channel; +import io.netty.util.concurrent.Promise; + +public class SimpleSessionNegotiator extends AbstractSessionNegotiator { + + public SimpleSessionNegotiator(Promise promise, Channel channel) { + super(promise, channel); + } + + @Override + protected void startNegotiation() throws Exception { + negotiationSuccessful(new SimpleSession()); + } + + @Override + protected void handleMessage(SimpleMessage msg) throws Exception { + throw new IllegalStateException("This method should never be invoked"); + } +}