opentelecoms-org / jsmpp

SMPP implemented in Java
Apache License 2.0
230 stars 160 forks source link

beans for ProtocolIdentifier #162

Closed kaoh closed 2 years ago

kaoh commented 2 years ago

I added beans to simplify to create the protocol identifier. It would be nice if the SMPPSession methods could use this as typesafe argument, but this would mean that this change is not API compatible.

pmoerenhout commented 2 years ago

Hi Karsten, I have some remarks: The ProtocolIdentifier(ProtocolIdentifierGroup protocolIdentifierGroup, TelematicInterworkingIndicator telematicInterworkingIndicator, TelematicDevice telematicDevice) is only valid for ProtocolIdentifierGroup#_00 but the user could still call it with another group. Same for ProtocolIdentifier(ProtocolIdentifierGroup protocolIdentifierGroup, ProtocolMessageType protocolMessageType). There are not getters to get the info on a parsed ProtocolIdentifier. Maybe subclasses make it more distinct between the different usages or a fluent contructor ? I can merge it and then improve it or do you want to improve it ?

kaoh commented 2 years ago

Hi, feel free to adjust it to your needs.