Mercurial > stress-tester
changeset 637:1d9bc9f80a6a
HttpNullClientWorker
author | Devel 2 |
---|---|
date | Thu, 02 Nov 2017 14:44:31 +0100 |
parents | b1f5360ef5a8 |
children | 66d541da3dc3 |
files | stress-tester/src/main/java/com/passus/st/client/http/HttpNullClientWorker.java |
diffstat | 1 files changed, 47 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stress-tester/src/main/java/com/passus/st/client/http/HttpNullClientWorker.java Thu Nov 02 14:44:31 2017 +0100 @@ -0,0 +1,47 @@ +package com.passus.st.client.http; + +import com.passus.st.client.DataEvents; +import com.passus.st.client.Event; +import com.passus.st.emitter.Emitter; +import com.passus.st.emitter.SessionInfo; + +/** + * + * @author Mirosław Hawrot + */ +public class HttpNullClientWorker extends HttpClientWorker { + + private boolean working = true; + + public HttpNullClientWorker(Emitter emitter, String name, int index) { + super(emitter, name, index); + } + + @Override + public boolean isWorking() { + return working; + } + + @Override + public int activeConnections() { + return 0; + } + + @Override + public void close() { + working = false; + } + + @Override + public void close(SessionInfo session) { + + } + + @Override + public void handle(Event event) { + if (event.getType() == DataEvents.DataLoopEnd.TYPE) { + working = false; + } + } + +}