|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sshd.common.random.SingletonRandomFactory
public class SingletonRandomFactory
A random factory wrapper that uses a single random instance. The underlying random instance has to be thread safe.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.sshd.common.NamedFactory |
|---|
NamedFactory.Utils |
| Constructor Summary | |
|---|---|
SingletonRandomFactory(NamedFactory<Random> factory)
|
|
| Method Summary | |
|---|---|
Random |
create()
Create a new instance |
void |
fill(byte[] bytes,
int start,
int len)
Fill part of bytes with random values. |
java.lang.String |
getName()
Name of this factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingletonRandomFactory(NamedFactory<Random> factory)
| Method Detail |
|---|
public void fill(byte[] bytes,
int start,
int len)
Random
fill in interface Randombytes - byte array to be filled.start - index to start filling at.len - length of segment to fill.public java.lang.String getName()
NamedFactory
getName in interface NamedFactory<Random>public Random create()
Factory
create in interface Factory<Random>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||