de.ls5.jlearn.oracles
Class PooledOracle

java.lang.Object
  extended by de.ls5.jlearn.oracles.PooledOracle
All Implemented Interfaces:
Oracle, Serializable

public class PooledOracle
extends Object
implements Oracle

Thread safe oracle that holds a collection of oracles. The access to oracles from this collection is synchronized by this oracle. PooledOracle can be used to realize distribution of queries to multiple systems under test.

Author:
fh
See Also:
Serialized Form

Constructor Summary
PooledOracle()
           
PooledOracle(Collection<Oracle> pool)
           
 
Method Summary
 long getQueries()
           
 Word processQuery(Word trace)
          Process an incoming sequence (word) of input symbols and return a sequence (word) of output symbols produced as reacion to the input symbols.
 void setPool(Collection<Oracle> pool)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PooledOracle

public PooledOracle()

PooledOracle

public PooledOracle(Collection<Oracle> pool)
Method Detail

processQuery

public Word processQuery(Word trace)
                  throws LearningException
Description copied from interface: Oracle
Process an incoming sequence (word) of input symbols and return a sequence (word) of output symbols produced as reacion to the input symbols.

Specified by:
processQuery in interface Oracle
Parameters:
trace - Word object respresenting the query the system is supposed to process
Returns:
Word object with the system's response to the provide query
Throws:
LearningException

setPool

public void setPool(Collection<Oracle> pool)

getQueries

public long getQueries()


Copyright © 2011. All Rights Reserved.