S - The type of sequence to consider.E - The type of entry in the sequence.public abstract class SequenceBuilder<S extends Sequence<E>,E extends SequenceEntry> extends Object
| Constructor and Description |
|---|
SequenceBuilder()
Creates a new user session builder.
|
| Modifier and Type | Method and Description |
|---|---|
SequenceBuilder<S,E> |
addListener(SequenceProcessor<S> listener)
Add a listener notified when a session is built (during buildSession
call).
|
abstract void |
buildSessions(InputStream input)
Build the sequences from the different entry of the
InputStream. |
SequenceBuilder<S,E> |
exclude(EntryFilter<E> filter)
Add an include filter to this builder.
|
SequenceBuilder<S,E> |
include(EntryFilter<E> filter)
Add an include filter to this builder.
|
protected boolean |
isAcceptedEntry(E req)
Check if the entry is accepted according to the include and exclude
filters.
|
protected void |
sequenceCompleted(S sequence)
Notifies the listeners that the given session has been built.
|
public SequenceBuilder<S,E> addListener(SequenceProcessor<S> listener)
listener - The listener to add.protected void sequenceCompleted(S sequence)
sequence - The sequence given to the listeners.public SequenceBuilder<S,E> include(EntryFilter<E> filter)
filter - The filter to addpublic SequenceBuilder<S,E> exclude(EntryFilter<E> filter)
filter - The filter to addprotected boolean isAcceptedEntry(E req)
req - The entry to process.public abstract void buildSessions(InputStream input) throws SessionBuildException
InputStream.
Each time a sequence is built, the listeners are notified. All the
entries in the builded sequence satisfy isAcceptedEntry(Entry).input - The InputStream to read.SessionBuildException - If an exception occurs during the building
of the sessions.Copyright © 2014–2018 University of Namur. All rights reserved.