2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.protocol.framework;
10 import io.netty.channel.Channel;
12 import java.util.Timer;
14 public final class SimpleSessionFactory implements ProtocolSessionFactory<SimpleSession> {
15 private final int maximumMessageSize;
17 public SimpleSessionFactory(final int maximumMessageSize) {
18 this.maximumMessageSize = maximumMessageSize;
22 public SimpleSession getProtocolSession(final SessionParent parent, final Timer timer, final ProtocolConnection connection,
23 final int sessionId, final Channel channel) {
24 return new SimpleSession(connection, parent, this.maximumMessageSize);