aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/BaseProtocol.java2
-rw-r--r--src/org/traccar/Protocol.java8
-rw-r--r--src/org/traccar/smpp/ClientSmppSessionHandler.java2
-rw-r--r--src/org/traccar/smpp/SmppClient.java10
4 files changed, 8 insertions, 14 deletions
diff --git a/src/org/traccar/BaseProtocol.java b/src/org/traccar/BaseProtocol.java
index 9a03fbff4..790a1484c 100644
--- a/src/org/traccar/BaseProtocol.java
+++ b/src/org/traccar/BaseProtocol.java
@@ -103,7 +103,7 @@ public abstract class BaseProtocol implements Protocol {
"Command " + command.getType() + " is not supported in protocol " + getName());
}
} else {
- throw new RuntimeException("Smpp client is not enabled");
+ throw new RuntimeException("SMPP client is not enabled");
}
}
diff --git a/src/org/traccar/Protocol.java b/src/org/traccar/Protocol.java
index 5f510b10b..f6a4fbebb 100644
--- a/src/org/traccar/Protocol.java
+++ b/src/org/traccar/Protocol.java
@@ -3,11 +3,6 @@ package org.traccar;
import org.traccar.database.ActiveDevice;
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 java.util.Collection;
import java.util.List;
@@ -23,7 +18,6 @@ public interface Protocol {
Collection<String> getSupportedSmsCommands();
- void sendSmsCommand(String phone, Command command) throws RecoverablePduException, UnrecoverablePduException,
- SmppTimeoutException, SmppChannelException, InterruptedException;
+ void sendSmsCommand(String phone, Command command) throws Exception;
}
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java
index abfd6120c..2a538a40f 100644
--- a/src/org/traccar/smpp/ClientSmppSessionHandler.java
+++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java
@@ -68,7 +68,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
@Override
public void fireChannelUnexpectedlyClosed() {
- Log.warning("Smpp session channel unexpectedly closed");
+ Log.warning("SMPP session channel unexpectedly closed");
smppClient.scheduleReconnect();
}
}
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index 7f004645d..006f86e53 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -149,10 +149,10 @@ public class SmppClient {
smppSession = clientBootstrap.bind(sessionConfig, sessionHandler);
stopReconnectionkTask();
runEnquireLinkTask();
- Log.info("Smpp session connected");
+ Log.info("SMPP session connected");
} catch (SmppTimeoutException | SmppChannelException
| UnrecoverablePduException | InterruptedException error) {
- Log.warning("Unable to connect to smpp server: ", error);
+ Log.warning("Unable to connect to SMPP server: ", error);
}
}
@@ -187,7 +187,7 @@ public class SmppClient {
private void destroySession() {
if (smppSession != null) {
- Log.debug("Cleaning up smpp session... ");
+ Log.debug("Cleaning up SMPP session... ");
smppSession.destroy();
smppSession = null;
}
@@ -206,12 +206,12 @@ public class SmppClient {
submit.setDestAddress(new Address(destTon, destNpi, destAddress));
SubmitSmResp submitResponce = getSession().submit(submit, submitTimeout);
if (submitResponce.getCommandStatus() == SmppConstants.STATUS_OK) {
- Log.debug("SMS submited, msg_id: " + submitResponce.getMessageId());
+ Log.debug("SMS submitted, message id: " + submitResponce.getMessageId());
} else {
throw new IllegalStateException(submitResponce.getResultMessage());
}
} else {
- throw new SmppChannelException("Smpp session is not connected");
+ throw new SmppChannelException("SMPP session is not connected");
}
}