diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-31 22:35:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-31 22:35:39 -0700 |
commit | 59416923dcb3a756eaf532cc4259f2f6625c0762 (patch) | |
tree | 9082dae6616deac8fda432b7bfd80e4a52b6d9dc /src/main/java/org/traccar/notification/JsonTypeEventForwarder.java | |
parent | 79a129dd6327d932133d6b9a50190d3f4927bff9 (diff) | |
download | traccar-server-59416923dcb3a756eaf532cc4259f2f6625c0762.tar.gz traccar-server-59416923dcb3a756eaf532cc4259f2f6625c0762.tar.bz2 traccar-server-59416923dcb3a756eaf532cc4259f2f6625c0762.zip |
Convert project to gradle
Diffstat (limited to 'src/main/java/org/traccar/notification/JsonTypeEventForwarder.java')
-rw-r--r-- | src/main/java/org/traccar/notification/JsonTypeEventForwarder.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/notification/JsonTypeEventForwarder.java b/src/main/java/org/traccar/notification/JsonTypeEventForwarder.java new file mode 100644 index 000000000..55d926fc8 --- /dev/null +++ b/src/main/java/org/traccar/notification/JsonTypeEventForwarder.java @@ -0,0 +1,18 @@ +package org.traccar.notification; + +import java.util.Set; + +import org.traccar.model.Event; +import org.traccar.model.Position; + +import javax.ws.rs.client.AsyncInvoker; +import javax.ws.rs.client.Entity; + +public class JsonTypeEventForwarder extends EventForwarder { + + @Override + protected void executeRequest(Event event, Position position, Set<Long> users, AsyncInvoker invoker) { + invoker.post(Entity.json(preparePayload(event, position, users))); + } + +} |