Package org.apache.camel.component.smpp
Class SmppConfiguration
java.lang.Object
org.apache.camel.component.smpp.SmppConfiguration
- All Implemented Interfaces:
Cloneable
Contains the SMPP component configuration properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureFromURI
(URI uri) A POJO which contains all necessary configuration parameters for the SMPP connectioncopy()
byte
byte
byte
byte
getHost()
long
int
Defines the maximum number of attempts to reconnect to the SMSC, if SMSC returns a negative bind responsebyte
The password for connecting to SMSC server.getPort()
byte
byte
long
byte
byte
org.jsmpp.session.SessionStateListener
byte
byte
byte
boolean
boolean
boolean
void
setAddressRange
(String addressRange) You can specify the address range for the SmppConsumer as defined in section 5.2.7 of the SMPP 3.4 specification.void
setAlphabet
(byte alphabet) Defines encoding of data according the SMPP 3.4 specification, section 5.2.19.void
setDataCoding
(byte dataCoding) Defines the data coding according the SMPP 3.4 specification, section 5.2.19.void
setDestAddr
(String destAddr) Defines the destination SME address.void
setDestAddrNpi
(byte destAddrNpi) Defines the type of number (TON) to be used in the SME destination address parameters.void
setDestAddrTon
(byte destAddrTon) Defines the type of number (TON) to be used in the SME destination address parameters.void
setEncoding
(String encoding) Defines the encoding scheme of the short message user data.void
setEnquireLinkTimer
(Integer enquireLinkTimer) Defines the interval in milliseconds between the confidence checks.void
Hostname for the SMSC server to use.void
setHttpProxyHost
(String httpProxyHost) If you need to tunnel SMPP through a HTTP proxy, set this attribute to the hostname or ip address of your HTTP proxy.void
setHttpProxyPassword
(String httpProxyPassword) If your HTTP proxy requires basic authentication, set this attribute to the password required for your HTTP proxy.void
setHttpProxyPort
(Integer httpProxyPort) If you need to tunnel SMPP through a HTTP proxy, set this attribute to the port of your HTTP proxy.void
setHttpProxyUsername
(String httpProxyUsername) If your HTTP proxy requires basic authentication, set this attribute to the username required for your HTTP proxy.void
setInitialReconnectDelay
(long initialReconnectDelay) Defines the initial delay in milliseconds after the consumer/producer tries to reconnect to the SMSC, after the connection was lost.void
setLazySessionCreation
(boolean lazySessionCreation) Sessions can be lazily created to avoid exceptions, if the SMSC is not available when the Camel producer is started.void
setMaxReconnect
(int maxReconnect) void
setMessageReceiverRouteId
(String messageReceiverRouteId) Set this on producer in order to benefit from transceiver (TRX) binding type.void
setNumberingPlanIndicator
(byte numberingPlanIndicator) Defines the numeric plan indicator (NPI) to be used in the SME.void
setPassword
(String password) void
setPduProcessorDegree
(Integer pduProcessorDegree) Sets the number of threads which can read PDU and process them in parallel.void
setPduProcessorQueueCapacity
(Integer pduProcessorQueueCapacity) Sets the capacity of the working queue for PDU processing.void
Port number for the SMSC server to use.void
setPriorityFlag
(byte priorityFlag) Allows the originating SME to assign a priority level to the short message.void
setProtocolId
(byte protocolId) The protocol idvoid
setProxyHeaders
(Map<String, String> proxyHeaders) These headers will be passed to the proxy server while establishing the connection.void
setReconnectDelay
(long reconnectDelay) Defines the interval in milliseconds between the reconnect attempts, if the connection to the SMSC was lost and the previous was not succeed.void
setRegisteredDelivery
(byte registeredDelivery) Is used to request an SMSC delivery receipt and/or SME originated acknowledgements.void
setReplaceIfPresentFlag
(byte replaceIfPresentFlag) Used to request the SMSC to replace a previously submitted message, that is still pending delivery.void
setServiceType
(String serviceType) The service type parameter can be used to indicate the SMS Application service associated with the message.void
setSessionStateListener
(org.jsmpp.session.SessionStateListener sessionStateListener) You can refer to a org.jsmpp.session.SessionStateListener in the Registry to receive callbacks when the session state changed.void
setSingleDLR
(boolean singleDLR) When true, the SMSC delivery receipt would be requested only for the last segment of a multi-segment (long) message.void
setSourceAddr
(String sourceAddr) Defines the address of SME (Short Message Entity) which originated this message.void
setSourceAddrNpi
(byte sourceAddrNpi) Defines the numeric plan indicator (NPI) to be used in the SME originator address parameters.void
setSourceAddrTon
(byte sourceAddrTon) Defines the type of number (TON) to be used in the SME originator address parameters.void
setSplittingPolicy
(SmppSplittingPolicy splittingPolicy) You can specify a policy for handling long messages: ALLOW - the default, long messages are split to 140 bytes per message TRUNCATE - long messages are split and only the first fragment will be sent to the SMSC.void
setSystemId
(String systemId) The system id (username) for connecting to SMSC server.void
setSystemType
(String systemType) This parameter is used to categorize the type of ESME (External Short Message Entity) that is binding to the SMSC (max.void
setTransactionTimer
(Integer transactionTimer) Defines the maximum period of inactivity allowed after a transaction, after which an SMPP entity may assume that the session is no longer active.void
setTypeOfNumber
(byte typeOfNumber) Defines the type of number (TON) to be used in the SME.void
setUsingSSL
(boolean usingSSL) Whether using SSL with the smpps protocoltoString()
-
Constructor Details
-
SmppConfiguration
public SmppConfiguration()
-
-
Method Details
-
configureFromURI
A POJO which contains all necessary configuration parameters for the SMPP connection- Parameters:
uri
- the full URI of the endpoint
-
copy
-
getHost
-
setHost
Hostname for the SMSC server to use. -
getPort
-
setPort
Port number for the SMSC server to use. -
getSystemId
-
setSystemId
The system id (username) for connecting to SMSC server. -
getPassword
The password for connecting to SMSC server. -
getDataCoding
public byte getDataCoding() -
setDataCoding
public void setDataCoding(byte dataCoding) Defines the data coding according the SMPP 3.4 specification, section 5.2.19. Example data encodings are:- 0: SMSC Default Alphabet
- 3: Latin 1 (ISO-8859-1)
- 4: Octet unspecified (8-bit binary)
- 8: UCS2 (ISO/IEC-10646)
- 13: Extended Kanji JIS(X 0212-1990)
-
getAlphabet
public byte getAlphabet() -
setAlphabet
public void setAlphabet(byte alphabet) Defines encoding of data according the SMPP 3.4 specification, section 5.2.19.- 0: SMSC Default Alphabet
- 4: 8 bit Alphabet
- 8: UCS2 Alphabet
-
getEncoding
-
setEncoding
Defines the encoding scheme of the short message user data. Only for SubmitSm, ReplaceSm and SubmitMulti. -
setPassword
-
getEnquireLinkTimer
-
setEnquireLinkTimer
Defines the interval in milliseconds between the confidence checks. The confidence check is used to test the communication path between an ESME and an SMSC. -
getTransactionTimer
-
setTransactionTimer
Defines the maximum period of inactivity allowed after a transaction, after which an SMPP entity may assume that the session is no longer active. This timer may be active on either communicating SMPP entity (i.e. SMSC or ESME). -
getSystemType
-
setSystemType
This parameter is used to categorize the type of ESME (External Short Message Entity) that is binding to the SMSC (max. 13 characters). -
getRegisteredDelivery
public byte getRegisteredDelivery() -
setRegisteredDelivery
public void setRegisteredDelivery(byte registeredDelivery) Is used to request an SMSC delivery receipt and/or SME originated acknowledgements. The following values are defined:- 0: No SMSC delivery receipt requested.
- 1: SMSC delivery receipt requested where final delivery outcome is success or failure.
- 2: SMSC delivery receipt requested where the final delivery outcome is delivery failure.
-
getServiceType
-
setServiceType
The service type parameter can be used to indicate the SMS Application service associated with the message. The following generic service_types are defined:- CMT: Cellular Messaging
- CPT: Cellular Paging
- VMN: Voice Mail Notification
- VMA: Voice Mail Alerting
- WAP: Wireless Application Protocol
- USSD: Unstructured Supplementary Services Data
-
getSourceAddrTon
public byte getSourceAddrTon() -
setSourceAddrTon
public void setSourceAddrTon(byte sourceAddrTon) Defines the type of number (TON) to be used in the SME originator address parameters. The following TON values are defined:- 0: Unknown
- 1: International
- 2: National
- 3: Network Specific
- 4: Subscriber Number
- 5: Alphanumeric
- 6: Abbreviated
-
getDestAddrTon
public byte getDestAddrTon() -
setDestAddrTon
public void setDestAddrTon(byte destAddrTon) Defines the type of number (TON) to be used in the SME destination address parameters. Only for SubmitSm, SubmitMulti, CancelSm and DataSm. The following TON values are defined:- 0: Unknown
- 1: International
- 2: National
- 3: Network Specific
- 4: Subscriber Number
- 5: Alphanumeric
- 6: Abbreviated
-
getSourceAddrNpi
public byte getSourceAddrNpi() -
setSourceAddrNpi
public void setSourceAddrNpi(byte sourceAddrNpi) Defines the numeric plan indicator (NPI) to be used in the SME originator address parameters. The following NPI values are defined:- 0: Unknown
- 1: ISDN (E163/E164)
- 2: Data (X.121)
- 3: Telex (F.69)
- 6: Land Mobile (E.212)
- 8: National
- 9: Private
- 10: ERMES
- 13: Internet (IP)
- 18: WAP Client Id (to be defined by WAP Forum)
-
getDestAddrNpi
public byte getDestAddrNpi() -
setDestAddrNpi
public void setDestAddrNpi(byte destAddrNpi) Defines the type of number (TON) to be used in the SME destination address parameters. Only for SubmitSm, SubmitMulti, CancelSm and DataSm. The following NPI values are defined:- 0: Unknown
- 1: ISDN (E163/E164)
- 2: Data (X.121)
- 3: Telex (F.69)
- 6: Land Mobile (E.212)
- 8: National
- 9: Private
- 10: ERMES
- 13: Internet (IP)
- 18: WAP Client Id (to be defined by WAP Forum)
-
getProtocolId
public byte getProtocolId() -
setProtocolId
public void setProtocolId(byte protocolId) The protocol id -
getPriorityFlag
public byte getPriorityFlag() -
setPriorityFlag
public void setPriorityFlag(byte priorityFlag) Allows the originating SME to assign a priority level to the short message. Only for SubmitSm and SubmitMulti. Four Priority Levels are supported:- 0: Level 0 (lowest) priority
- 1: Level 1 priority
- 2: Level 2 priority
- 3: Level 3 (highest) priority
-
getReplaceIfPresentFlag
public byte getReplaceIfPresentFlag() -
setReplaceIfPresentFlag
public void setReplaceIfPresentFlag(byte replaceIfPresentFlag) Used to request the SMSC to replace a previously submitted message, that is still pending delivery. The SMSC will replace an existing message provided that the source address, destination address and service type match the same fields in the new message. The following replace if present flag values are defined:- 0: Don't replace
- 1: Replace
-
getSourceAddr
-
setSourceAddr
Defines the address of SME (Short Message Entity) which originated this message. -
getDestAddr
-
setDestAddr
Defines the destination SME address. For mobile terminated messages, this is the directory number of the recipient MS. Only for SubmitSm, SubmitMulti, CancelSm and DataSm. -
getTypeOfNumber
public byte getTypeOfNumber() -
setTypeOfNumber
public void setTypeOfNumber(byte typeOfNumber) Defines the type of number (TON) to be used in the SME. The following TON values are defined:- 0: Unknown
- 1: International
- 2: National
- 3: Network Specific
- 4: Subscriber Number
- 5: Alphanumeric
- 6: Abbreviated
-
getNumberingPlanIndicator
public byte getNumberingPlanIndicator() -
setNumberingPlanIndicator
public void setNumberingPlanIndicator(byte numberingPlanIndicator) Defines the numeric plan indicator (NPI) to be used in the SME. The following NPI values are defined:- 0: Unknown
- 1: ISDN (E163/E164)
- 2: Data (X.121)
- 3: Telex (F.69)
- 6: Land Mobile (E.212)
- 8: National
- 9: Private
- 10: ERMES
- 13: Internet (IP)
- 18: WAP Client Id (to be defined by WAP Forum)
-
isUsingSSL
public boolean isUsingSSL() -
setUsingSSL
public void setUsingSSL(boolean usingSSL) Whether using SSL with the smpps protocol -
getInitialReconnectDelay
public long getInitialReconnectDelay() -
setInitialReconnectDelay
public void setInitialReconnectDelay(long initialReconnectDelay) Defines the initial delay in milliseconds after the consumer/producer tries to reconnect to the SMSC, after the connection was lost. -
getReconnectDelay
public long getReconnectDelay() -
setReconnectDelay
public void setReconnectDelay(long reconnectDelay) Defines the interval in milliseconds between the reconnect attempts, if the connection to the SMSC was lost and the previous was not succeed. -
getMaxReconnect
public int getMaxReconnect()Defines the maximum number of attempts to reconnect to the SMSC, if SMSC returns a negative bind response -
setMaxReconnect
public void setMaxReconnect(int maxReconnect) -
isLazySessionCreation
public boolean isLazySessionCreation() -
setLazySessionCreation
public void setLazySessionCreation(boolean lazySessionCreation) Sessions can be lazily created to avoid exceptions, if the SMSC is not available when the Camel producer is started. Camel will check the in message headers 'CamelSmppSystemId' and 'CamelSmppPassword' of the first exchange. If they are present, Camel will use these data to connect to the SMSC. -
getMessageReceiverRouteId
-
setMessageReceiverRouteId
Set this on producer in order to benefit from transceiver (TRX) binding type. So once set, you don't need to define an 'SMTPP consumer' endpoint anymore. You would set this to a 'Direct consumer' endpoint instead. DISCALIMER: This feature is only tested with 'Direct consumer' endpoint. The behavior with any other consumer type is unknown and not tested. -
getHttpProxyHost
-
setHttpProxyHost
If you need to tunnel SMPP through a HTTP proxy, set this attribute to the hostname or ip address of your HTTP proxy. -
getHttpProxyPort
-
setHttpProxyPort
If you need to tunnel SMPP through a HTTP proxy, set this attribute to the port of your HTTP proxy. -
getHttpProxyUsername
-
setHttpProxyUsername
If your HTTP proxy requires basic authentication, set this attribute to the username required for your HTTP proxy. -
getHttpProxyPassword
-
setHttpProxyPassword
If your HTTP proxy requires basic authentication, set this attribute to the password required for your HTTP proxy. -
getSessionStateListener
public org.jsmpp.session.SessionStateListener getSessionStateListener() -
setSessionStateListener
public void setSessionStateListener(org.jsmpp.session.SessionStateListener sessionStateListener) You can refer to a org.jsmpp.session.SessionStateListener in the Registry to receive callbacks when the session state changed. -
getAddressRange
-
setAddressRange
You can specify the address range for the SmppConsumer as defined in section 5.2.7 of the SMPP 3.4 specification. The SmppConsumer will receive messages only from SMSC's which target an address (MSISDN or IP address) within this range. -
getSplittingPolicy
-
setSplittingPolicy
You can specify a policy for handling long messages:- ALLOW - the default, long messages are split to 140 bytes per message
- TRUNCATE - long messages are split and only the first fragment will be sent to the SMSC. Some carriers drop subsequent fragments so this reduces load on the SMPP connection sending parts of a message that will never be delivered.
- REJECT - if a message would need to be split, it is rejected with an SMPP NegativeResponseException and the reason code signifying the message is too long.
-
setProxyHeaders
These headers will be passed to the proxy server while establishing the connection. -
getProxyHeaders
-
getPduProcessorDegree
-
setPduProcessorDegree
Sets the number of threads which can read PDU and process them in parallel. -
getPduProcessorQueueCapacity
-
setPduProcessorQueueCapacity
Sets the capacity of the working queue for PDU processing. -
isSingleDLR
public boolean isSingleDLR() -
setSingleDLR
public void setSingleDLR(boolean singleDLR) When true, the SMSC delivery receipt would be requested only for the last segment of a multi-segment (long) message. For short messages, with only 1 segment the behaviour is unchanged. -
toString
-