org.objectweb.jonathan.protocols.multiplex.lib
Class RandomPolicyFactory

java.lang.Object
  extended byorg.objectweb.jonathan.protocols.multiplex.lib.RandomPolicyFactory
All Implemented Interfaces:
MultiplexingPolicyFactory

public class RandomPolicyFactory
extends Object
implements MultiplexingPolicyFactory

Naive implementation of a multiplexing policy. This picks randomly a session among the possible ones. Feedback is ignored.


Constructor Summary
RandomPolicyFactory()
           
 
Method Summary
 MultiplexingPolicy newPolicy(Session_High[] sessions, Protocol[] protocols)
          Creates a new MultiplexingPolicy instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomPolicyFactory

public RandomPolicyFactory()
Method Detail

newPolicy

public MultiplexingPolicy newPolicy(Session_High[] sessions,
                                    Protocol[] protocols)
Description copied from interface: MultiplexingPolicyFactory
Creates a new MultiplexingPolicy instance.

Specified by:
newPolicy in interface MultiplexingPolicyFactory
Parameters:
sessions - the lower level Session_Highs.
protocols - the protocols corresponding to the sessions, in the same order.
Returns:
a new MultiplexingPolicy.