Make sure PCEPMessageHeader is threadsafe
[bgpcep.git] / framework / src / main / java / org / opendaylight / protocol / framework / ProtocolSessionFactory.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.framework;
9
10 import io.netty.channel.Channel;
11
12 import java.util.Timer;
13
14 /**
15  * Factory for generating Protocol Sessions. This class should be extended to return protocol specific session.
16  */
17 public interface ProtocolSessionFactory<T extends ProtocolSession> {
18
19         /**
20          * Creates and returns protocol specific session.
21          * 
22          * @param parent SessionParent
23          * @param timer Timer
24          * @param connection connection attributes
25          * @param sessionId session identifier
26          * @param channel associated channel
27          * @return new session
28          */
29         public T getProtocolSession(SessionParent dispatcher, Timer timer, ProtocolConnection connection, int sessionId,
30                         Channel channel);
31 }