class SequenceFactory {

    public WilmaSequence createNewSequence(final String sequenceKey, final WilmaHttpRequest request, final long timeout) {
        WilmaSequencePairs messageStore = new WilmaSequencePairs();
        RequestResponsePair firstPair = new RequestResponsePair(request);
        String loggerId = request.getWilmaMessageId();
        messageStore.addStore(loggerId, firstPair);
        WilmaSequence sequence = new WilmaSequence(sequenceKey, new Timestamp(dateProvider.getCurrentTimeInMillis() + timeout), messageStore);
        return sequence;
    }

}