public class SmsServiceImpl extends Object implements SmsService
SmsServiceImpl class.
Constructor and Description |
---|
SmsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addGateway(org.smslib.AGateway gateway)
addGateway
|
boolean |
addToGroup(String groupName,
String number)
addToGroup
|
boolean |
createGroup(String groupName)
createGroup
|
boolean |
deleteMessage(org.smslib.InboundMessage msg)
deleteMessage
|
ArrayList<String> |
expandGroup(String groupName)
expandGroup
|
org.smslib.AGateway |
findGateway(String gatewayId)
findGateway
|
int |
getBaudRate()
getBaudRate
|
org.smslib.ICallNotification |
getCallNotification()
getCallNotification
|
List<GatewayGroup> |
getGatewayGroup()
getGatewayGroup
|
Collection<org.smslib.AGateway> |
getGateways()
getGateways
|
org.smslib.AGateway[] |
getGatewaysNET()
getGatewaysNET
|
List<org.smslib.IGatewayStatusNotification> |
getGatewayStatusListeners()
getGatewayStatusListeners
|
org.smslib.IGatewayStatusNotification |
getGatewayStatusNotification()
getGatewayStatusNotification
|
List<OnmsInboundMessageNotification> |
getInboundListeners()
getInboundListeners
|
int |
getInboundMessageCount()
getInboundMessageCount
|
int |
getInboundMessageCount(org.smslib.AGateway gateway)
getInboundMessageCount
|
int |
getInboundMessageCount(String gatewayId)
getInboundMessageCount
|
OnmsInboundMessageNotification |
getInboundNotification()
getInboundNotification
|
org.smslib.crypto.KeyManager |
getKeyManager()
getKeyManager
|
org.smslib.balancing.LoadBalancer |
getLoadBalancer()
getLoadBalancer
|
String |
getManufacturer()
getManufacturer
|
String |
getModel()
getModel
|
String |
getModemId()
getModemId
|
String |
getModemPort()
getModemPort
|
List<org.smslib.IOutboundMessageNotification> |
getOutboundListeners()
getOutboundListeners
|
int |
getOutboundMessageCount()
getOutboundMessageCount
|
int |
getOutboundMessageCount(org.smslib.AGateway gateway)
getOutboundMessageCount
|
int |
getOutboundMessageCount(String gatewayId)
getOutboundMessageCount
|
org.smslib.IOutboundMessageNotification |
getOutboundNotification()
getOutboundNotification
|
org.smslib.queues.QueueManager |
getQueueManager()
getQueueManager
|
org.smslib.IQueueSendingNotification |
getQueueSendingNotification()
getQueueSendingNotification
|
org.smslib.routing.Router |
getRouter()
getRouter
|
org.smslib.Service |
getService()
getService
|
org.smslib.Service.ServiceStatus |
getServiceStatus()
getServiceStatus
|
org.smslib.Settings |
getSettings()
getSettings
|
long |
getStartMillis()
getStartMillis
|
org.smslib.IUSSDNotification |
getUSSDNotification()
getUSSDNotification
|
boolean |
queueMessage(org.smslib.OutboundMessage msg)
queueMessage
|
boolean |
queueMessage(org.smslib.OutboundMessage msg,
String gatewayId)
queueMessage
|
int |
queueMessages(Collection<org.smslib.OutboundMessage> msgList)
queueMessages
|
int |
queueMessages(Collection<org.smslib.OutboundMessage> msgList,
String gatewayId)
queueMessages
|
int |
queueMessages(org.smslib.OutboundMessage[] msgArray)
queueMessages
|
int |
queueMessages(org.smslib.OutboundMessage[] msgArray,
String gatewayId)
queueMessages
|
org.smslib.InboundMessage |
readMessage(String gatewayId,
String memLoc,
int memIndex)
readMessage
|
int |
readMessages(Collection<org.smslib.InboundMessage> msgList,
org.smslib.InboundMessage.MessageClasses msgClass)
readMessages
|
int |
readMessages(Collection<org.smslib.InboundMessage> msgList,
org.smslib.InboundMessage.MessageClasses msgClass,
org.smslib.AGateway gateway)
readMessages
|
int |
readMessages(Collection<org.smslib.InboundMessage> msgList,
org.smslib.InboundMessage.MessageClasses msgClass,
String gatewayId)
readMessages
|
org.smslib.InboundMessage[] |
readMessages(org.smslib.InboundMessage.MessageClasses msgClass)
readMessages
|
org.smslib.InboundMessage[] |
readMessages(org.smslib.InboundMessage.MessageClasses msgClass,
org.smslib.AGateway gateway)
readMessages
|
org.smslib.InboundMessage[] |
readMessages(org.smslib.InboundMessage.MessageClasses msgClass,
String gatewayId)
readMessages
|
int |
readPhonebook(org.smslib.Phonebook phonebook,
String gatewayId)
readPhonebook
|
void |
refresh(Map<?,?> properties)
refresh
|
void |
register(SmsServiceRegistrar smsServiceRegistrar)
register
|
boolean |
removeFromGroup(String groupName,
String number)
removeFromGroup
|
boolean |
removeGateway(org.smslib.AGateway gateway)
removeGateway
|
boolean |
removeGroup(String groupName)
removeGroup
|
boolean |
removeMessage(org.smslib.OutboundMessage msg)
removeMessage
|
boolean |
sendMessage(org.smslib.OutboundMessage msg)
sendMessage
|
boolean |
sendMessage(org.smslib.OutboundMessage msg,
String gatewayId)
sendMessage
|
int |
sendMessages(Collection<org.smslib.OutboundMessage> msgList)
sendMessages
|
int |
sendMessages(Collection<org.smslib.OutboundMessage> msgList,
String gatewayId)
sendMessages
|
int |
sendMessages(org.smslib.OutboundMessage[] msgArray)
sendMessages
|
int |
sendMessages(org.smslib.OutboundMessage[] msgArray,
String gatewayId)
sendMessages
|
boolean |
sendUSSDRequest(org.smslib.USSDRequest req,
String gatewayId)
sendUSSDRequest
|
void |
setBaudRate(int baudRate)
setBaudRate
|
void |
setCallNotification(org.smslib.ICallNotification callNotification)
setCallNotification
|
void |
setGatewayGroup(List<GatewayGroup> m_gatewayGroup)
setGatewayGroup
|
void |
setGatewayStatusListeners(List<org.smslib.IGatewayStatusNotification> gatewayStatusListeners)
setGatewayStatusListeners
|
void |
setGatewayStatusNotification(org.smslib.IGatewayStatusNotification gatewayStatusNotification)
setGatewayStatusNotification
|
void |
setInboundNotification(OnmsInboundMessageNotification inboundNotification)
setInboundNotification
|
void |
setLoadBalancer(org.smslib.balancing.LoadBalancer loadBalancer)
setLoadBalancer
|
void |
setManufacturer(String manufacturer)
setManufacturer
|
void |
setModel(String model)
setModel
|
void |
setModemId(String modemId)
setModemId
|
void |
setModemPort(String modemPort)
setModemPort
|
void |
setOutboundListeners(List<org.smslib.IOutboundMessageNotification> outboundListeners)
setOutboundListeners
|
void |
setOutboundNotification(org.smslib.IOutboundMessageNotification outboundNotification)
setOutboundNotification
|
void |
setQueueSendingNotification(org.smslib.IQueueSendingNotification queueSendingNotification)
setQueueSendingNotification
|
void |
setRouter(org.smslib.routing.Router router)
setRouter
|
void |
setService(org.smslib.Service m_service)
setService
|
void |
setUSSDNotification(org.smslib.IUSSDNotification notif)
setUSSDNotification
|
void |
start()
start
|
void |
startService()
startService
|
void |
stop()
stop
|
void |
stopService()
stopService
|
void |
unregister(SmsServiceRegistrar smsServiceRegistrar)
unregister
|
public List<org.smslib.IOutboundMessageNotification> getOutboundListeners()
getOutboundListeners
public void setOutboundListeners(List<org.smslib.IOutboundMessageNotification> outboundListeners)
setOutboundListeners
outboundListeners
- the outboundListeners to setpublic List<OnmsInboundMessageNotification> getInboundListeners()
getInboundListeners
public List<org.smslib.IGatewayStatusNotification> getGatewayStatusListeners()
getGatewayStatusListeners
public void setGatewayStatusListeners(List<org.smslib.IGatewayStatusNotification> gatewayStatusListeners)
setGatewayStatusListeners
gatewayStatusListeners
- the gatewayStatusListeners to setpublic String getModemId()
getModemId
public void setModemId(String modemId)
setModemId
modemId
- the modemId to setpublic String getModemPort()
getModemPort
public void setModemPort(String modemPort)
setModemPort
modemPort
- the modemPort to setpublic int getBaudRate()
getBaudRate
public void setBaudRate(int baudRate)
setBaudRate
baudRate
- the baudRate to setpublic String getManufacturer()
getManufacturer
public void setManufacturer(String manufacturer)
setManufacturer
manufacturer
- the manufacturer to setpublic String getModel()
getModel
public void setModel(String model)
setModel
model
- the model to setpublic void start()
start
public void stop()
stop
public void addGateway(org.smslib.AGateway gateway) throws org.smslib.GatewayException
addGateway
addGateway
in interface SmsService
gateway
- a AGateway
object.org.smslib.GatewayException
- if any.public boolean addToGroup(String groupName, String number)
addToGroup
addToGroup
in interface SmsService
groupName
- a String
object.number
- a String
object.public boolean createGroup(String groupName)
createGroup
createGroup
in interface SmsService
groupName
- a String
object.public boolean deleteMessage(org.smslib.InboundMessage msg) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
deleteMessage
deleteMessage
in interface SmsService
msg
- a InboundMessage
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public ArrayList<String> expandGroup(String groupName)
expandGroup
expandGroup
in interface SmsService
groupName
- a String
object.ArrayList
object.public org.smslib.AGateway findGateway(String gatewayId)
findGateway
findGateway
in interface SmsService
gatewayId
- a String
object.AGateway
object.public org.smslib.ICallNotification getCallNotification()
getCallNotification
getCallNotification
in interface SmsService
ICallNotification
object.public org.smslib.IGatewayStatusNotification getGatewayStatusNotification()
getGatewayStatusNotification
getGatewayStatusNotification
in interface SmsService
IGatewayStatusNotification
object.public Collection<org.smslib.AGateway> getGateways()
getGateways
getGateways
in interface SmsService
Collection
object.public org.smslib.AGateway[] getGatewaysNET()
getGatewaysNET
getGatewaysNET
in interface SmsService
AGateway
objects.public int getInboundMessageCount(String gatewayId)
getInboundMessageCount
getInboundMessageCount
in interface SmsService
gatewayId
- a String
object.public int getInboundMessageCount(org.smslib.AGateway gateway)
getInboundMessageCount
getInboundMessageCount
in interface SmsService
gateway
- a AGateway
object.public int getInboundMessageCount()
getInboundMessageCount
getInboundMessageCount
in interface SmsService
public OnmsInboundMessageNotification getInboundNotification()
getInboundNotification
getInboundNotification
in interface SmsService
OnmsInboundMessageNotification
object.public org.smslib.crypto.KeyManager getKeyManager()
getKeyManager
getKeyManager
in interface SmsService
KeyManager
object.public org.smslib.balancing.LoadBalancer getLoadBalancer()
getLoadBalancer
getLoadBalancer
in interface SmsService
LoadBalancer
object.public int getOutboundMessageCount(String gatewayId)
getOutboundMessageCount
getOutboundMessageCount
in interface SmsService
gatewayId
- a String
object.public int getOutboundMessageCount(org.smslib.AGateway gateway)
getOutboundMessageCount
getOutboundMessageCount
in interface SmsService
gateway
- a AGateway
object.public int getOutboundMessageCount()
getOutboundMessageCount
getOutboundMessageCount
in interface SmsService
public org.smslib.IOutboundMessageNotification getOutboundNotification()
getOutboundNotification
getOutboundNotification
in interface SmsService
IOutboundMessageNotification
object.public org.smslib.queues.QueueManager getQueueManager()
getQueueManager
getQueueManager
in interface SmsService
QueueManager
object.public org.smslib.IQueueSendingNotification getQueueSendingNotification()
getQueueSendingNotification
getQueueSendingNotification
in interface SmsService
IQueueSendingNotification
object.public org.smslib.routing.Router getRouter()
getRouter
getRouter
in interface SmsService
Router
object.public org.smslib.Service.ServiceStatus getServiceStatus()
getServiceStatus
getServiceStatus
in interface SmsService
Service.ServiceStatus
object.public org.smslib.Settings getSettings()
getSettings
getSettings
in interface SmsService
Settings
object.public long getStartMillis()
getStartMillis
getStartMillis
in interface SmsService
public boolean queueMessage(org.smslib.OutboundMessage msg)
queueMessage
queueMessage
in interface SmsService
msg
- a OutboundMessage
object.public boolean queueMessage(org.smslib.OutboundMessage msg, String gatewayId)
queueMessage
queueMessage
in interface SmsService
msg
- a OutboundMessage
object.gatewayId
- a String
object.public int queueMessages(Collection<org.smslib.OutboundMessage> msgList)
queueMessages
queueMessages
in interface SmsService
msgList
- a Collection
object.public int queueMessages(org.smslib.OutboundMessage[] msgArray)
queueMessages
queueMessages
in interface SmsService
msgArray
- an array of OutboundMessage
objects.public int queueMessages(Collection<org.smslib.OutboundMessage> msgList, String gatewayId)
queueMessages
queueMessages
in interface SmsService
msgList
- a Collection
object.gatewayId
- a String
object.public int queueMessages(org.smslib.OutboundMessage[] msgArray, String gatewayId)
queueMessages
queueMessages
in interface SmsService
msgArray
- an array of OutboundMessage
objects.gatewayId
- a String
object.public org.smslib.InboundMessage readMessage(String gatewayId, String memLoc, int memIndex) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessage
readMessage
in interface SmsService
gatewayId
- a String
object.memLoc
- a String
object.memIndex
- a int.InboundMessage
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int readMessages(Collection<org.smslib.InboundMessage> msgList, org.smslib.InboundMessage.MessageClasses msgClass) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgList
- a Collection
object.msgClass
- a InboundMessage.MessageClasses
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public org.smslib.InboundMessage[] readMessages(org.smslib.InboundMessage.MessageClasses msgClass) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgClass
- a InboundMessage.MessageClasses
object.InboundMessage
objects.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int readMessages(Collection<org.smslib.InboundMessage> msgList, org.smslib.InboundMessage.MessageClasses msgClass, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgList
- a Collection
object.msgClass
- a InboundMessage.MessageClasses
object.gatewayId
- a String
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public org.smslib.InboundMessage[] readMessages(org.smslib.InboundMessage.MessageClasses msgClass, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgClass
- a InboundMessage.MessageClasses
object.gatewayId
- a String
object.InboundMessage
objects.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int readMessages(Collection<org.smslib.InboundMessage> msgList, org.smslib.InboundMessage.MessageClasses msgClass, org.smslib.AGateway gateway) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgList
- a Collection
object.msgClass
- a InboundMessage.MessageClasses
object.gateway
- a AGateway
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public org.smslib.InboundMessage[] readMessages(org.smslib.InboundMessage.MessageClasses msgClass, org.smslib.AGateway gateway) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readMessages
readMessages
in interface SmsService
msgClass
- a InboundMessage.MessageClasses
object.gateway
- a AGateway
object.InboundMessage
objects.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int readPhonebook(org.smslib.Phonebook phonebook, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
readPhonebook
readPhonebook
in interface SmsService
phonebook
- a Phonebook
object.gatewayId
- a String
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public boolean removeFromGroup(String groupName, String number)
removeFromGroup
removeFromGroup
in interface SmsService
groupName
- a String
object.number
- a String
object.public boolean removeGateway(org.smslib.AGateway gateway) throws org.smslib.GatewayException
removeGateway
removeGateway
in interface SmsService
gateway
- a AGateway
object.org.smslib.GatewayException
- if any.public boolean removeGroup(String groupName)
removeGroup
removeGroup
in interface SmsService
groupName
- a String
object.public boolean removeMessage(org.smslib.OutboundMessage msg)
removeMessage
removeMessage
in interface SmsService
msg
- a OutboundMessage
object.public boolean sendMessage(org.smslib.OutboundMessage msg) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessage
sendMessage
in interface SmsService
msg
- a OutboundMessage
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public boolean sendMessage(org.smslib.OutboundMessage msg, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessage
sendMessage
in interface SmsService
msg
- a OutboundMessage
object.gatewayId
- a String
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int sendMessages(Collection<org.smslib.OutboundMessage> msgList) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessages
sendMessages
in interface SmsService
msgList
- a Collection
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int sendMessages(org.smslib.OutboundMessage[] msgArray) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessages
sendMessages
in interface SmsService
msgArray
- an array of OutboundMessage
objects.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int sendMessages(Collection<org.smslib.OutboundMessage> msgList, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessages
sendMessages
in interface SmsService
msgList
- a Collection
object.gatewayId
- a String
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public int sendMessages(org.smslib.OutboundMessage[] msgArray, String gatewayId) throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
sendMessages
sendMessages
in interface SmsService
msgArray
- an array of OutboundMessage
objects.gatewayId
- a String
object.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public void setCallNotification(org.smslib.ICallNotification callNotification)
setCallNotification
setCallNotification
in interface SmsService
callNotification
- a ICallNotification
object.public void setGatewayStatusNotification(org.smslib.IGatewayStatusNotification gatewayStatusNotification)
setGatewayStatusNotification
setGatewayStatusNotification
in interface SmsService
gatewayStatusNotification
- a IGatewayStatusNotification
object.public void setInboundNotification(OnmsInboundMessageNotification inboundNotification)
setInboundNotification
setInboundNotification
in interface SmsService
inboundNotification
- a OnmsInboundMessageNotification
object.public void setLoadBalancer(org.smslib.balancing.LoadBalancer loadBalancer)
setLoadBalancer
setLoadBalancer
in interface SmsService
loadBalancer
- a LoadBalancer
object.public void setOutboundNotification(org.smslib.IOutboundMessageNotification outboundNotification)
setOutboundNotification
setOutboundNotification
in interface SmsService
outboundNotification
- a IOutboundMessageNotification
object.public void setQueueSendingNotification(org.smslib.IQueueSendingNotification queueSendingNotification)
setQueueSendingNotification
setQueueSendingNotification
in interface SmsService
queueSendingNotification
- a IQueueSendingNotification
object.public void setRouter(org.smslib.routing.Router router)
setRouter
setRouter
in interface SmsService
router
- a Router
object.public void startService() throws org.smslib.SMSLibException, org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
startService
startService
in interface SmsService
org.smslib.SMSLibException
- if any.org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public void stopService() throws org.smslib.TimeoutException, org.smslib.GatewayException, IOException, InterruptedException
stopService
stopService
in interface SmsService
org.smslib.TimeoutException
- if any.org.smslib.GatewayException
- if any.IOException
- if any.InterruptedException
- if any.public void setService(org.smslib.Service m_service)
setService
m_service
- a Service
object.public org.smslib.Service getService()
getService
Service
object.public void setGatewayGroup(List<GatewayGroup> m_gatewayGroup)
setGatewayGroup
m_gatewayGroup
- a List
object.public List<GatewayGroup> getGatewayGroup()
getGatewayGroup
List
object.public void register(SmsServiceRegistrar smsServiceRegistrar)
register
smsServiceRegistrar
- a SmsServiceRegistrar
object.public void unregister(SmsServiceRegistrar smsServiceRegistrar)
unregister
smsServiceRegistrar
- a SmsServiceRegistrar
object.public org.smslib.IUSSDNotification getUSSDNotification()
getUSSDNotification
getUSSDNotification
in interface SmsService
IUSSDNotification
object.public boolean sendUSSDRequest(org.smslib.USSDRequest req, String gatewayId) throws org.smslib.GatewayException, org.smslib.TimeoutException, IOException, InterruptedException
sendUSSDRequest
sendUSSDRequest
in interface SmsService
req
- a USSDRequest
object.gatewayId
- a String
object.org.smslib.GatewayException
- if any.org.smslib.TimeoutException
- if any.IOException
- if any.InterruptedException
- if any.public void setUSSDNotification(org.smslib.IUSSDNotification notif)
setUSSDNotification
setUSSDNotification
in interface SmsService
notif
- a IUSSDNotification
object.Copyright © 2015. All Rights Reserved.