Class KeyExchangeGenerator
- java.lang.Object
- 
- org.activecomponents.udp.asymciphers.KeyExchangeGenerator
 
- 
 public class KeyExchangeGenerator extends java.lang.ObjectKey exchange generator which can be used to pre-generate exchanges in background.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.reflect.Constructor<?>conConstructor for the key exchangeprotected static intDEFAULT_TARGET_PREGENThe default target number of pre-gen key exchanges.protected java.util.concurrent.BlockingQueue<IKeyExchange>pregenexPre-generated exchange mechanisms.protected booleanrunningRunning flag.protected java.util.concurrent.CyclicBarriershutdownbarrierBarrier for coordinating shutdown.protected java.lang.RunnabletaskGeneration task.
 - 
Constructor SummaryConstructors Constructor Description KeyExchangeGenerator(java.lang.String exchangeclass)KeyExchangeGenerator(java.lang.String exchangeclass, int targetkeys)Creates a new key exchange generator.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IKeyExchangegetKeyExchange()Returns a new key exchange mechanism.voidstart(IThreadExecutor texec)Starts the background key exchange generation.voidstop()Stops the background key exchange generation.
 
- 
- 
- 
Field Detail- 
DEFAULT_TARGET_PREGENprotected static final int DEFAULT_TARGET_PREGEN The default target number of pre-gen key exchanges.- See Also:
- Constant Field Values
 
 - 
pregenexprotected java.util.concurrent.BlockingQueue<IKeyExchange> pregenex Pre-generated exchange mechanisms.
 - 
runningprotected volatile boolean running Running flag.
 - 
shutdownbarrierprotected java.util.concurrent.CyclicBarrier shutdownbarrier Barrier for coordinating shutdown.
 - 
conprotected java.lang.reflect.Constructor<?> con Constructor for the key exchange
 - 
taskprotected java.lang.Runnable task Generation task.
 
- 
 - 
Constructor Detail- 
KeyExchangeGeneratorpublic KeyExchangeGenerator(java.lang.String exchangeclass) 
 - 
KeyExchangeGeneratorpublic KeyExchangeGenerator(java.lang.String exchangeclass, int targetkeys)Creates a new key exchange generator.- Parameters:
- exchangeclass- Class used for key exchange.
- targetkeys- Target number of pre-generated exchanges.
 
 
- 
 - 
Method Detail- 
startpublic void start(IThreadExecutor texec) Starts the background key exchange generation.
 - 
stoppublic void stop() Stops the background key exchange generation.
 - 
getKeyExchangepublic IKeyExchange getKeyExchange() Returns a new key exchange mechanism.- Returns:
- Key exchange mechanism.
 
 
- 
 
-