aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-27 15:55:19 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-27 15:55:19 +0500
commit14840af2abd9976b8f5634af8e77f4a7126dfac1 (patch)
treed9bd2bc190a1a67bda345cc804f3b21d20416cec /src/org/traccar/smpp
parentb70e46560359a181b0136fa1c6b0400615bfc904 (diff)
downloadtrackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.gz
trackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.tar.bz2
trackermap-server-14840af2abd9976b8f5634af8e77f4a7126dfac1.zip
- Rename NotificationException to MessageException
- Simplify Notificator instantiation - Make sms configuration more clear - Move some defaults in code - Some cleanup
Diffstat (limited to 'src/org/traccar/smpp')
-rw-r--r--src/org/traccar/smpp/SmppClient.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index d5e6820ab..ddda4cb4f 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -25,8 +25,8 @@ import java.util.concurrent.TimeUnit;
import org.traccar.Context;
import org.traccar.helper.Log;
-import org.traccar.sms.SMSException;
-import org.traccar.sms.SMSManager;
+import org.traccar.notification.MessageException;
+import org.traccar.sms.SmsManager;
import com.cloudhopper.commons.charset.CharsetUtil;
import com.cloudhopper.smpp.SmppBindType;
@@ -44,7 +44,7 @@ import com.cloudhopper.smpp.type.SmppChannelException;
import com.cloudhopper.smpp.type.SmppTimeoutException;
import com.cloudhopper.smpp.type.UnrecoverablePduException;
-public class SmppClient implements SMSManager {
+public class SmppClient implements SmsManager {
private SmppSessionConfiguration sessionConfig = new SmppSessionConfiguration();
private SmppSession smppSession;
@@ -216,7 +216,7 @@ public class SmppClient implements SMSManager {
@Override
public synchronized void sendMessageSync(String destAddress, String message, boolean command)
- throws SMSException, InterruptedException, IllegalStateException {
+ throws MessageException, InterruptedException, IllegalStateException {
if (getSession() != null && getSession().isBound()) {
try {
SubmitSm submit = new SubmitSm();
@@ -245,10 +245,10 @@ public class SmppClient implements SMSManager {
}
} catch (SmppChannelException | RecoverablePduException
| SmppTimeoutException | UnrecoverablePduException error) {
- throw new SMSException(error);
+ throw new MessageException(error);
}
} else {
- throw new SMSException(new SmppChannelException("SMPP session is not connected"));
+ throw new MessageException(new SmppChannelException("SMPP session is not connected"));
}
}
@@ -259,7 +259,7 @@ public class SmppClient implements SMSManager {
public void run() {
try {
sendMessageSync(destAddress, message, command);
- } catch (SMSException | InterruptedException | IllegalStateException error) {
+ } catch (MessageException | InterruptedException | IllegalStateException error) {
Log.warning(error);
}
}