throws MessageException {
this.channelName = channelName;
SMSCAddress = (String) channelInfo.get(ADDRESS);
if (SMSCAddress == null) {
throw new MessageException(
localizer.format("channel-property-missing",
new Object[] {channelName, ADDRESS}));
}
String portString = (String) channelInfo.get(PORT);
if (portString == null) {
throw new MessageException(
localizer.format("channel-property-missing",
new Object[] {channelName, PORT}));
}
try {
SMSCPort = Integer.parseInt(portString);
} catch (NumberFormatException nfe) {
throw new MessageException(
localizer.format("channel-property-invalid",
new Object[] {PORT, portString}));
}
SMSCUser = (String) channelInfo.get(USERNAME);
if (SMSCUser == null) {
throw new MessageException(
localizer.format("channel-property-missing",
new Object[] {channelName, USERNAME}));
}
SMSCPassword = (String) channelInfo.get(PASSWORD);
if (SMSCPassword == null) {
throw new MessageException(
localizer.format("channel-property-missing",
new Object[] {channelName, PASSWORD}));
}
SMSCBindType = (String) channelInfo.get(BINDTYPE);