aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-02 17:05:25 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-02 17:06:48 +0500
commit6ff73337236f126839e8ce936ba9d201e8a501c7 (patch)
treeeff0c6fc8b121e528ad80ce2ab573f8e08625b52 /src/org/traccar/api
parent5a964d4adf67d2f49b58f0b14d4388d7aa2353d2 (diff)
downloadtrackermap-server-6ff73337236f126839e8ce936ba9d201e8a501c7.tar.gz
trackermap-server-6ff73337236f126839e8ce936ba9d201e8a501c7.tar.bz2
trackermap-server-6ff73337236f126839e8ce936ba9d201e8a501c7.zip
Remove BaseProtocolSmsEncoder class
Add fallback to SMS if device is not online Use more variables and ternary operators
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/CommandResource.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/org/traccar/api/resource/CommandResource.java b/src/org/traccar/api/resource/CommandResource.java
index e5468b5f5..9ed92d3d5 100644
--- a/src/org/traccar/api/resource/CommandResource.java
+++ b/src/org/traccar/api/resource/CommandResource.java
@@ -19,11 +19,6 @@ import org.traccar.Context;
import org.traccar.api.BaseResource;
import org.traccar.model.Command;
-import com.cloudhopper.smpp.type.RecoverablePduException;
-import com.cloudhopper.smpp.type.SmppChannelException;
-import com.cloudhopper.smpp.type.SmppTimeoutException;
-import com.cloudhopper.smpp.type.UnrecoverablePduException;
-
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
@@ -37,8 +32,7 @@ import javax.ws.rs.core.Response;
public class CommandResource extends BaseResource {
@POST
- public Response add(Command entity) throws RecoverablePduException, UnrecoverablePduException,
- SmppTimeoutException, SmppChannelException, InterruptedException {
+ public Response add(Command entity) throws Exception {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getPermissionsManager().checkDevice(getUserId(), entity.getDeviceId());
Context.getDeviceManager().sendCommand(entity);