Activate code generation
[bgpcep.git] / framework / src / main / java / org / opendaylight / protocol / framework / SSLSelectableChannel.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 /**
11  * As in order to work with SSLSelectionKey, a channel needs to implement
12  * this interface. It is used to determine SSL progress and update interestOps
13  * of underlying channel.
14  */
15 interface SSLSelectableChannel {
16         /**
17          * Return the events which the underlying channel should be selected for,
18          * based on what the user would like to see from us.
19          * 
20          * @param ops user's interest ops
21          * @return Calculated interest ops, including internal needs
22          */
23         public int computeInterestOps(final int ops);
24
25         /**
26          * Return a freshly-calculated operations which the channel is ready to
27          * make progress on.
28          * 
29          * @return Calculated ready ops
30          */
31         public int computeReadyOps();
32 }
33