nitingautam / smslib

Automatically exported from code.google.com/p/smslib
0 stars 0 forks source link

Service.readMessages fails if one gateway doesn't support reading messages #354

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Calling Service.readMessages(Collection<InboundMessage> msgList,
MessageClasses msgClass) fails if one gateway doesn't support reading
messages. A GatewayException "Feature not supported" is thrown.

This affects SMSSever because it continuously calls Service.readMessages.

Service.readMessages checks whether the gateway is inbound or not, but not
all inbound gateways support reading messages. It should also check if
reading messages is supported by gateway. 

Original issue reported on code.google.com by balsar...@gmail.com on 30 Apr 2010 at 8:13

GoogleCodeExporter commented 9 years ago
This must be an implementation bug. How can an INBOUND gateway not support the 
readMessages() operation??? An inbound gateway *should* override the read 
methods.

Do you mean something else? Or do I miss something?

Original comment by T.Delenikas on 1 May 2010 at 5:48

GoogleCodeExporter commented 9 years ago
SMPP gateway doesn't support readMessages because it only notifies listeners 
when a
message is received.

Original comment by balsar...@gmail.com on 1 May 2010 at 12:16

GoogleCodeExporter commented 9 years ago
I keep forgetting about this new gateway... :)

Why don't you override (dummy-override) the readMessages() members? Or remove 
the 
GatewayException from the Abstract members?

Original comment by T.Delenikas on 1 May 2010 at 1:30

GoogleCodeExporter commented 9 years ago
I think that GatewayException in readMessages() and other abstract methods 
should not
be removed because they remind an implementer of a new gateway that he forget to
implement something. Although, I would recommend throwing a more meaningful 
Exception
such as UnSupportedOperationException instead (which could be a subclass of
GatewayException in order to be compatible), but that's another matter.

I will override readMessages() for now, but a better solution would be to add 
special
gateway attributes (see issue 355) so that Service methods can check before 
calling
gateway methods 

Original comment by balsar...@gmail.com on 1 May 2010 at 3:34

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 1 May 2010 at 8:04

GoogleCodeExporter commented 9 years ago
r2219

Original comment by balsar...@gmail.com on 7 Jul 2010 at 8:50

GoogleCodeExporter commented 9 years ago
Hi,
Iam having a prob with my sms lib.
Iam new in the field but so interested
i w'd like to have more knowledge
about sms usage.

Original comment by jefsun...@gmail.com on 14 Jul 2010 at 6:36

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 13 Nov 2010 at 8:16