IP*Works! SSL V6

ipworksssl
Class Smpps

java.lang.Object
  |
  +--ipworksssl.Smpps

public class Smpps
extends java.lang.Object

The SMPPS bean implements a lightweight message transmission interface using the Short Message Peer-to-Peer protocol, most known for its use in cellular text messaging.

The SMPP bean can only bind as a transmitter, and thus can receive nothing outside of server command responses. However, it can send single- and multi-recipient messages, and can upload data.

Using SMPP is quite easy. First, simply set the SMPPServer , SMPPPort , and, if needed, the SMPPVersion properties. Second, a single call to the Connect method with a specified user id and password will connect the bean.

Transmitting messages is just as easy. You can set the RecipientAddress and RecipientType properties directly, or just use AddRecipient method to add recipients one-by-one to the recipient list. After all recipients have been added, a single call to the SendMessage method will transmit the specified message. If the send is successful, the method will set and return the value of the MessageId property. Otherwise, an Error event will fire for each unsuccessful message destination.

The SMPP bean supports message and data transmission, as well as auxiliary operations such as CheckMessage and ReplaceMessage . All non-implemented features of the protocol are supported through the SendCommand method and PITrail event. Due to the nature of the protocol, all methods and operations are implemented synchronously.


Field Summary
static int fwNone
           
static int fwSOCKS4
           
static int fwSOCKS5
           
static int fwTunnel
           
static int smppMessagePriorityHigh
           
static int smppMessagePriorityLow
           
static int smppMessagePriorityNormal
           
static int smppMessagePriorityUrgent
           
static int smppRecipientTypeList
           
static int smppRecipientTypeNormal
           
static int smppServiceCBS
           
static int smppServiceCMT
           
static int smppServiceCPT
           
static int smppServiceDefault
           
static int smppServiceUSSD
           
static int smppServiceVMA
           
static int smppServiceVMN
           
static int smppServiceWAP
           
static int smppVersion33
           
static int smppVersion34
           
static int smppVersion50
           
static int sstMachine
           
static int sstPEMKey
           
static int sstPFXBlob
           
static int sstPFXFile
           
static int sstUser
           
 
Constructor Summary
Smpps()
           
 
Method Summary
 void addRecipient(int recipientType, java.lang.String recipientAddress)
          This method will add a recipient of the specified type to the recipient list.
 void addSmppsEventListener(SmppsEventListener l)
           
 void cancelMessage(java.lang.String messageId)
          This method will cancel the specified message.
 void checkLink()
          This method will check the connection to the server.
 java.lang.String checkMessage(java.lang.String messageId)
          This method will retrieve the status of the specified message.
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a beanconfiguration setting.
 void connect(java.lang.String userId, java.lang.String password)
          This method will bind as a transmitter to the SMPP service.
 void disconnect()
          This method will disconnect from the SMPP service.
 java.lang.String getFirewallHost()
          Name or IP address of firewall (optional).
 java.lang.String getFirewallPassword()
          A password if authentication is to be used when connecting through the firewall.
 int getFirewallPort()
          Port of the firewall to connect to.
 int getFirewallType()
          Determines the type of firewall to connect through.
 java.lang.String getFirewallUser()
          A user name if authentication is to be used connecting through a firewall.
 java.lang.String getMessageExpiration()
          This property denotes the validity period of the current message.
 java.lang.String getMessageId()
          This is the id of the most recently sent message.
 int getMessagePriority()
          This is the priority level of the current message.
 java.lang.String getPassword()
          This is the user's password.
 java.lang.String getRecipient()
          This property corresponds to the first recipient in the recipient list.
 java.lang.String getRecipientAddress(int recipientIdx)
          Array property that indicates the address of a particular recipient.
 int getRecipientCount()
          This value indicates the number of recipients in the recipient list.
 int getRecipientType(int recipientIdx)
          Array property that indicates the type of a particular recipient.
 java.lang.String getScheduledDelivery()
          This value tells the server when to deliver the current message.
 int getServiceType()
          This indicates the type of service for the current message.
 int getSMPPPort()
          The server port for secure SMPP (default 3551).
 java.lang.String getSMPPServer()
          This is the SMPP entity to which the component will connect.
 int getSMPPVersion()
          This is the SMPP version to be used throughout the connection.
 byte[] getSSLAcceptServerCert()
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 byte[] getSSLCertEncoded()
          The SSL certificate (PEM/base64 encoded).
 byte[] getSSLCertStore()
          The name of the certificate store for the client certificate.
 java.lang.String getSSLCertStorePassword()
          The password for the certificate store (if any).
 int getSSLCertStoreType()
          The type of certificate store for the client certificate.
 java.lang.String getSSLCertSubject()
          The subject of the certificate used for client authentication.
 byte[] getSSLServerCert()
          The server certificate for the last established connection.
 java.lang.String getSSLServerCertStatus()
          The verification status of the server certificate for the last established connection.
 java.lang.String getSystemType()
          This is a string representing the type of system during a connection.
 int getTimeout()
          A timeout for the bean.
 java.lang.String getUserId()
          This value is used for identification with the SMPP service.
 boolean isConnected()
          This property indicates whether or not the bean is bound.
 void removeSmppsEventListener(SmppsEventListener l)
           
 void replaceMessage(java.lang.String messageId, java.lang.String newMessage)
          This method replaces a previously sent message with a new one.
 byte[] sendCommand(int commandId, byte[] payload)
          This will format and send a PDU using the specified command id and payload.
 java.lang.String sendData(byte[] data)
          This method sends data to the Recipient .
 java.lang.String sendMessage(java.lang.String message)
          The methods sends a message to all recipients in the recipient list.
 void setFirewallHost(java.lang.String firewallHost)
          Name or IP address of firewall (optional).
 void setFirewallPassword(java.lang.String firewallPassword)
          A password if authentication is to be used when connecting through the firewall.
 void setFirewallPort(int firewallPort)
          Port of the firewall to connect to.
 void setFirewallType(int firewallType)
          Determines the type of firewall to connect through.
 void setFirewallUser(java.lang.String firewallUser)
          A user name if authentication is to be used connecting through a firewall.
 void setMessageExpiration(java.lang.String messageExpiration)
          This property denotes the validity period of the current message.
 void setMessagePriority(int messagePriority)
          This is the priority level of the current message.
 void setPassword(java.lang.String password)
          This is the user's password.
 void setRecipient(java.lang.String recipient)
          This property corresponds to the first recipient in the recipient list.
 void setRecipientAddress(int recipientIdx, java.lang.String recipientAddress)
          Array property that indicates the address of a particular recipient.
 void setRecipientCount(int recipientCount)
          This value indicates the number of recipients in the recipient list.
 void setRecipientType(int recipientIdx, int recipientType)
          Array property that indicates the type of a particular recipient.
 void setScheduledDelivery(java.lang.String scheduledDelivery)
          This value tells the server when to deliver the current message.
 void setServiceType(int serviceType)
          This indicates the type of service for the current message.
 void setSMPPPort(int SMPPPort)
          The server port for secure SMPP (default 3551).
 void setSMPPServer(java.lang.String SMPPServer)
          This is the SMPP entity to which the component will connect.
 void setSMPPVersion(int SMPPVersion)
          This is the SMPP version to be used throughout the connection.
 void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 void setSSLCertEncoded(byte[] SSLCertEncoded)
          The SSL certificate (PEM/base64 encoded).
 void setSSLCertStore(byte[] SSLCertStore)
          The name of the certificate store for the client certificate.
 void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
          The password for the certificate store (if any).
 void setSSLCertStoreType(int SSLCertStoreType)
          The type of certificate store for the client certificate.
 void setSSLCertSubject(java.lang.String SSLCertSubject)
          The subject of the certificate used for client authentication.
 void setSystemType(java.lang.String systemType)
          This is a string representing the type of system during a connection.
 void setTimeout(int timeout)
          A timeout for the bean.
 void setUserId(java.lang.String userId)
          This value is used for identification with the SMPP service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fwNone

public static final int fwNone
See Also:
Constant Field Values

fwTunnel

public static final int fwTunnel
See Also:
Constant Field Values

fwSOCKS4

public static final int fwSOCKS4
See Also:
Constant Field Values

fwSOCKS5

public static final int fwSOCKS5
See Also:
Constant Field Values

smppMessagePriorityLow

public static final int smppMessagePriorityLow
See Also:
Constant Field Values

smppMessagePriorityNormal

public static final int smppMessagePriorityNormal
See Also:
Constant Field Values

smppMessagePriorityHigh

public static final int smppMessagePriorityHigh
See Also:
Constant Field Values

smppMessagePriorityUrgent

public static final int smppMessagePriorityUrgent
See Also:
Constant Field Values

smppRecipientTypeNormal

public static final int smppRecipientTypeNormal
See Also:
Constant Field Values

smppRecipientTypeList

public static final int smppRecipientTypeList
See Also:
Constant Field Values

smppServiceDefault

public static final int smppServiceDefault
See Also:
Constant Field Values

smppServiceCMT

public static final int smppServiceCMT
See Also:
Constant Field Values

smppServiceCPT

public static final int smppServiceCPT
See Also:
Constant Field Values

smppServiceVMN

public static final int smppServiceVMN
See Also:
Constant Field Values

smppServiceVMA

public static final int smppServiceVMA
See Also:
Constant Field Values

smppServiceWAP

public static final int smppServiceWAP
See Also:
Constant Field Values

smppServiceUSSD

public static final int smppServiceUSSD
See Also:
Constant Field Values

smppServiceCBS

public static final int smppServiceCBS
See Also:
Constant Field Values

smppVersion50

public static final int smppVersion50
See Also:
Constant Field Values

smppVersion34

public static final int smppVersion34
See Also:
Constant Field Values

smppVersion33

public static final int smppVersion33
See Also:
Constant Field Values

sstUser

public static final int sstUser
See Also:
Constant Field Values

sstMachine

public static final int sstMachine
See Also:
Constant Field Values

sstPFXFile

public static final int sstPFXFile
See Also:
Constant Field Values

sstPFXBlob

public static final int sstPFXBlob
See Also:
Constant Field Values

sstPEMKey

public static final int sstPEMKey
See Also:
Constant Field Values
Constructor Detail

Smpps

public Smpps()
Method Detail

isConnected

public boolean isConnected()
This property indicates whether or not the bean is bound.

This value shows whether or not the bean has successfully bound to the SMPPServer . It will not be true until a successful Connected event has fired.

There are two ways to bind: by calling Connect with a user id and password and will set the UserId and Password properties before connecting; or by setting those two properties and calling SendMessage while not connected.


getFirewallHost

public java.lang.String getFirewallHost()
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.


setFirewallHost

public void setFirewallHost(java.lang.String firewallHost)
                     throws IPWorksSSLException
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.

IPWorksSSLException

getFirewallPassword

public java.lang.String getFirewallPassword()
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallPassword

public void setFirewallPassword(java.lang.String firewallPassword)
                         throws IPWorksSSLException
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

getFirewallPort

public int getFirewallPort()
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.


setFirewallPort

public void setFirewallPort(int firewallPort)
                     throws IPWorksSSLException
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.

IPWorksSSLException

getFirewallType

public int getFirewallType()
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.


setFirewallType

public void setFirewallType(int firewallType)
                     throws IPWorksSSLException
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

IPWorksSSLException

getFirewallUser

public java.lang.String getFirewallUser()
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallUser

public void setFirewallUser(java.lang.String firewallUser)
                     throws IPWorksSSLException
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

getMessageExpiration

public java.lang.String getMessageExpiration()
This property denotes the validity period of the current message.

The MessageExpiration property indicates the MC expiration time, after which the message should be discarded if not delivered to the destination. It can be set using absolute or relative time formats.

Absolute Time Format is a 16-character string represented as "YYMMDDhhmmsstnnp" where:

YY
the last two digits of the year (00-99)
MM
month (01-12)
DD
day (01-31)
hh
hour (00-23)
mm
minute (00-59)
ss
second (00-59)
t
tenths of a second (0-9)
nn
quarter-hour time difference between local time and UTC time (00-48)
p
"+" or "-" indicating the direction of the time offset in nn

Relative Time Format is the same 16-character string where "p" should be set to "R" for "relative". For relative time, "tnn" are ignored and thus should be set to a constant value of "000".


setMessageExpiration

public void setMessageExpiration(java.lang.String messageExpiration)
                          throws IPWorksSSLException
This property denotes the validity period of the current message.

The MessageExpiration property indicates the MC expiration time, after which the message should be discarded if not delivered to the destination. It can be set using absolute or relative time formats.

Absolute Time Format is a 16-character string represented as "YYMMDDhhmmsstnnp" where:

YY
the last two digits of the year (00-99)
MM
month (01-12)
DD
day (01-31)
hh
hour (00-23)
mm
minute (00-59)
ss
second (00-59)
t
tenths of a second (0-9)
nn
quarter-hour time difference between local time and UTC time (00-48)
p
"+" or "-" indicating the direction of the time offset in nn

Relative Time Format is the same 16-character string where "p" should be set to "R" for "relative". For relative time, "tnn" are ignored and thus should be set to a constant value of "000".

IPWorksSSLException

getMessageId

public java.lang.String getMessageId()
This is the id of the most recently sent message.

After a successful call to SendMessage , the MessageId property will be set to the server-assigned id of that message.


getMessagePriority

public int getMessagePriority()
This is the priority level of the current message.

When sending a message, the MessagePriority property will tell the server what type of priority to assign to the message. The effect of the message priority setting is dependent upon the Message Center manufacturer and the network on which the target recipient lies. For example, some MCs may immediately forward "urgent" messages, some networks may use the priority setting as a visual indicator of the message's urgency (e.g. blinking icons, etc.), and some networks may entirely ignore the priority setting.


setMessagePriority

public void setMessagePriority(int messagePriority)
                        throws IPWorksSSLException
This is the priority level of the current message.

When sending a message, the MessagePriority property will tell the server what type of priority to assign to the message. The effect of the message priority setting is dependent upon the Message Center manufacturer and the network on which the target recipient lies. For example, some MCs may immediately forward "urgent" messages, some networks may use the priority setting as a visual indicator of the message's urgency (e.g. blinking icons, etc.), and some networks may entirely ignore the priority setting.

IPWorksSSLException

getPassword

public java.lang.String getPassword()
This is the user's password.

When binding to the SMPPServer , the client must provide a known user id and a valid password for that id.

There are two ways to bind: by calling Connect with a user id and password and will set the UserId and Password properties before connecting; or by setting those two properties and calling SendMessage while not connected.


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksSSLException
This is the user's password.

When binding to the SMPPServer , the client must provide a known user id and a valid password for that id.

There are two ways to bind: by calling Connect with a user id and password and will set the UserId and Password properties before connecting; or by setting those two properties and calling SendMessage while not connected.

IPWorksSSLException

getRecipient

public java.lang.String getRecipient()
This property corresponds to the first recipient in the recipient list.

For sending single messages, only the recipient is significant. Setting Recipient is equivalent to setting RecipientCount to 1, the first entry in RecipientAddress to the desired destination, and RecipientType to normal.

Note: Setting Recipient to "" (empty string) will reset the RecipientCount to 0.


setRecipient

public void setRecipient(java.lang.String recipient)
                  throws IPWorksSSLException
This property corresponds to the first recipient in the recipient list.

For sending single messages, only the recipient is significant. Setting Recipient is equivalent to setting RecipientCount to 1, the first entry in RecipientAddress to the desired destination, and RecipientType to normal.

Note: Setting Recipient to "" (empty string) will reset the RecipientCount to 0.

IPWorksSSLException

getRecipientAddress

public java.lang.String getRecipientAddress(int recipientIdx)
                                     throws IPWorksSSLException
Array property that indicates the address of a particular recipient.

The RecipientAddress property can be used for setting single or multiple recipients. It is an array that is closely associated with the values in RecipientType and RecipientCount . Each entry corresponds directly to the same index in RecipientType .

For a recipient type of normal, the value in RecipientAddress should be either the dotted IPv4 of an SMS-enabled device or the directory number of a target mobile phone. For distributed lists, the value should be the name of the list as it is stored on the SMPPServer .

The first entry in this list can also be set using the Recipient property. Doing so will set RecipientCount to 1, and the first entry being the specified recipient with a type of normal.

IPWorksSSLException

setRecipientAddress

public void setRecipientAddress(int recipientIdx,
                                java.lang.String recipientAddress)
                         throws IPWorksSSLException
Array property that indicates the address of a particular recipient.

The RecipientAddress property can be used for setting single or multiple recipients. It is an array that is closely associated with the values in RecipientType and RecipientCount . Each entry corresponds directly to the same index in RecipientType .

For a recipient type of normal, the value in RecipientAddress should be either the dotted IPv4 of an SMS-enabled device or the directory number of a target mobile phone. For distributed lists, the value should be the name of the list as it is stored on the SMPPServer .

The first entry in this list can also be set using the Recipient property. Doing so will set RecipientCount to 1, and the first entry being the specified recipient with a type of normal.

IPWorksSSLException

getRecipientCount

public int getRecipientCount()
This value indicates the number of recipients in the recipient list.

RecipientCount is the total number of message recipients specified by the client. It can contain any value from 0 to 255. When sending messages, this value is used to determine whether to send a single- or multi-recipient message.

It is important to keep this property in mind when sending messages. If the value is not changed between messages, the Smpp bean will send multi-recipient messages each time. Setting the value to a smaller number is the same as clearing all recipient values at indexes above that number.

There are two ways to manipulate the recipient list. The first is to manually set RecipientCount , RecipientAddress , and RecipientType . The second is to use AddRecipient , which will increment RecipientCount and set the last entry in the list.


setRecipientCount

public void setRecipientCount(int recipientCount)
                       throws IPWorksSSLException
This value indicates the number of recipients in the recipient list.

RecipientCount is the total number of message recipients specified by the client. It can contain any value from 0 to 255. When sending messages, this value is used to determine whether to send a single- or multi-recipient message.

It is important to keep this property in mind when sending messages. If the value is not changed between messages, the Smpp bean will send multi-recipient messages each time. Setting the value to a smaller number is the same as clearing all recipient values at indexes above that number.

There are two ways to manipulate the recipient list. The first is to manually set RecipientCount , RecipientAddress , and RecipientType . The second is to use AddRecipient , which will increment RecipientCount and set the last entry in the list.

IPWorksSSLException

getRecipientType

public int getRecipientType(int recipientIdx)
                     throws IPWorksSSLException
Array property that indicates the type of a particular recipient.

The RecipientType property is used only for multiple recipient messages. It is an array that is closely associated with the values in RecipientAddress and RecipientCount . Each entry corresponds directly to the same index in RecipientAddress .

For a recipient type of normal, the value in RecipientAddress should be either the dotted IPv4 of an SMS-enabled device or the directory number of a target mobile phone. For distributed lists, the value should be the name of the list as it is stored on the SMPPServer .

The first entry in this list can also be set using the Recipient property. Doing so will set RecipientCount to 1, and the first entry being the specified recipient with a type of normal.

IPWorksSSLException

setRecipientType

public void setRecipientType(int recipientIdx,
                             int recipientType)
                      throws IPWorksSSLException
Array property that indicates the type of a particular recipient.

The RecipientType property is used only for multiple recipient messages. It is an array that is closely associated with the values in RecipientAddress and RecipientCount . Each entry corresponds directly to the same index in RecipientAddress .

For a recipient type of normal, the value in RecipientAddress should be either the dotted IPv4 of an SMS-enabled device or the directory number of a target mobile phone. For distributed lists, the value should be the name of the list as it is stored on the SMPPServer .

The first entry in this list can also be set using the Recipient property. Doing so will set RecipientCount to 1, and the first entry being the specified recipient with a type of normal.

IPWorksSSLException

getScheduledDelivery

public java.lang.String getScheduledDelivery()
This value tells the server when to deliver the current message.

ScheduledDelivery is used by the bean when sending a message to inform the Message Center (MC) to forward the message to the intended recipients at a specific time. It can be set using absolute or relative time formats.

Absolute Time Format is a 16-character string represented as "YYMMDDhhmmsstnnp" where:

YY
the last two digits of the year (00-99)
MM
month (01-12)
DD
day (01-31)
hh
hour (00-23)
mm
minute (00-59)
ss
second (00-59)
t
tenths of a second (0-9)
nn
quarter-hour time difference between local time and UTC time (00-48)
p
"+" or "-" indicating the direction of the time offset in nn

Relative Time Format is the same 16-character string where "p" should be set to "R" for "relative". For relative time, "tnn" are ignored and thus should be set to a constant value of "000".


setScheduledDelivery

public void setScheduledDelivery(java.lang.String scheduledDelivery)
                          throws IPWorksSSLException
This value tells the server when to deliver the current message.

ScheduledDelivery is used by the bean when sending a message to inform the Message Center (MC) to forward the message to the intended recipients at a specific time. It can be set using absolute or relative time formats.

Absolute Time Format is a 16-character string represented as "YYMMDDhhmmsstnnp" where:

YY
the last two digits of the year (00-99)
MM
month (01-12)
DD
day (01-31)
hh
hour (00-23)
mm
minute (00-59)
ss
second (00-59)
t
tenths of a second (0-9)
nn
quarter-hour time difference between local time and UTC time (00-48)
p
"+" or "-" indicating the direction of the time offset in nn

Relative Time Format is the same 16-character string where "p" should be set to "R" for "relative". For relative time, "tnn" are ignored and thus should be set to a constant value of "000".

IPWorksSSLException

getServiceType

public int getServiceType()
This indicates the type of service for the current message.

When sending messages, the ServiceType property is used define the SMS application service to be associated with the message. The MC will use the value to determine the availability of enhanced messaging services and to control the teleservice used on the air interface.

The values are defined in the SMPP 5.0 specification as the following:

"" (NULL)
the MC default
CMT
Cellular Messaging
CPT
Cellular Paging
VMN
Voice Mail Notification
VMA
Voice Mail Alerting
WAP
Wireless Application Protocol
USSD
Unstructured Supplementary Services Data
CBS
Cell Broadcast Service


setServiceType

public void setServiceType(int serviceType)
                    throws IPWorksSSLException
This indicates the type of service for the current message.

When sending messages, the ServiceType property is used define the SMS application service to be associated with the message. The MC will use the value to determine the availability of enhanced messaging services and to control the teleservice used on the air interface.

The values are defined in the SMPP 5.0 specification as the following:

"" (NULL)
the MC default
CMT
Cellular Messaging
CPT
Cellular Paging
VMN
Voice Mail Notification
VMA
Voice Mail Alerting
WAP
Wireless Application Protocol
USSD
Unstructured Supplementary Services Data
CBS
Cell Broadcast Service

IPWorksSSLException

getSMPPPort

public int getSMPPPort()
The server port for secure SMPP (default 3551).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.


setSMPPPort

public void setSMPPPort(int SMPPPort)
                 throws IPWorksSSLException
The server port for secure SMPP (default 3551).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

IPWorksSSLException

getSMPPServer

public java.lang.String getSMPPServer()
This is the SMPP entity to which the component will connect.

This is the instant messaging server to which the bean will connect when the Connect method is called. The SMPPServer property must contain a valid SMPP service application address.


setSMPPServer

public void setSMPPServer(java.lang.String SMPPServer)
                   throws IPWorksSSLException
This is the SMPP entity to which the component will connect.

This is the instant messaging server to which the bean will connect when the Connect method is called. The SMPPServer property must contain a valid SMPP service application address.

IPWorksSSLException

getSMPPVersion

public int getSMPPVersion()
This is the SMPP version to be used throughout the connection.

Currently, the most widely used version of the SMPP protocol is version 3.4. However, since the newest version is 5.0, the default value for the bean is smppVersion50 (0). The value is used by the bean when binding to the SMPPServer to indicate to the server which version of the protocol to use when interpreting commands received from the bean.

Changing the value will not limit the functionality of the bean when performing any operation, as each version of SMPP is backward compatible with previous implementations. However, if the SMPPServer does not recognize a particular command, it will respond with an error indicating that the PDU was erred. Which commands are recognizable is strictly dependent on the implementation of the server, and the adherence to protocol guidelines of that implementation.


setSMPPVersion

public void setSMPPVersion(int SMPPVersion)
                    throws IPWorksSSLException
This is the SMPP version to be used throughout the connection.

Currently, the most widely used version of the SMPP protocol is version 3.4. However, since the newest version is 5.0, the default value for the bean is smppVersion50 (0). The value is used by the bean when binding to the SMPPServer to indicate to the server which version of the protocol to use when interpreting commands received from the bean.

Changing the value will not limit the functionality of the bean when performing any operation, as each version of SMPP is backward compatible with previous implementations. However, if the SMPPServer does not recognize a particular command, it will respond with an error indicating that the PDU was erred. Which commands are recognizable is strictly dependent on the implementation of the server, and the adherence to protocol guidelines of that implementation.

IPWorksSSLException

getSSLAcceptServerCert

public byte[] getSSLAcceptServerCert()
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.


setSSLAcceptServerCert

public void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
                            throws IPWorksSSLException
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.

IPWorksSSLException

getSSLCertEncoded

public byte[] getSSLCertEncoded()
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.


setSSLCertEncoded

public void setSSLCertEncoded(byte[] SSLCertEncoded)
                       throws IPWorksSSLException
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.

IPWorksSSLException

getSSLCertStore

public byte[] getSSLCertStore()
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.


setSSLCertStore

public void setSSLCertStore(byte[] SSLCertStore)
                     throws IPWorksSSLException
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.

IPWorksSSLException

getSSLCertStorePassword

public java.lang.String getSSLCertStorePassword()
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.


setSSLCertStorePassword

public void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
                             throws IPWorksSSLException
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.

IPWorksSSLException

getSSLCertStoreType

public int getSSLCertStoreType()
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.


setSSLCertStoreType

public void setSSLCertStoreType(int SSLCertStoreType)
                         throws IPWorksSSLException
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.

IPWorksSSLException

getSSLCertSubject

public java.lang.String getSSLCertSubject()
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.


setSSLCertSubject

public void setSSLCertSubject(java.lang.String SSLCertSubject)
                       throws IPWorksSSLException
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.

IPWorksSSLException

getSSLServerCert

public byte[] getSSLServerCert()
The server certificate for the last established connection.

SSLServerCert contains the server certificate for the last established connection.

SSLServerCert is reset every time a new connection is attempted.


getSSLServerCertStatus

public java.lang.String getSSLServerCertStatus()
The verification status of the server certificate for the last established connection.

When the verification fails, SSLServerCertStatus contains a string that indicates the reason(s) why, otherwise, it contains the string "OK".

Please note that the value of SSLServerCertStatus must be considered as only a suggestion as to the validity of the certificate. Application software must use its own logic to determine whether to accept the certificate or not, by using the SSLServerCert to access other certificate properties, or other application-specific information.

SSLServerCertStatus is reset an empty string every time a new connection is attempted.


getSystemType

public java.lang.String getSystemType()
This is a string representing the type of system during a connection.

Some SMS servers require that a system type be supplied during connection. The system type is a string representation, usually as an abbreviation, of a particular kind of system. The string cannot exceed 12 bytes.


setSystemType

public void setSystemType(java.lang.String systemType)
                   throws IPWorksSSLException
This is a string representing the type of system during a connection.

Some SMS servers require that a system type be supplied during connection. The system type is a string representation, usually as an abbreviation, of a particular kind of system. The string cannot exceed 12 bytes.

IPWorksSSLException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksSSLException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).

IPWorksSSLException

getUserId

public java.lang.String getUserId()
This value is used for identification with the SMPP service.

When binding to the SMPPServer , the client must provide a known user id and a valid password for that id.

There are two ways to bind: by calling Connect with a user id and password and will set the UserId and Password properties before connecting; or by setting those two properties and calling SendMessage while not connected.


setUserId

public void setUserId(java.lang.String userId)
               throws IPWorksSSLException
This value is used for identification with the SMPP service.

When binding to the SMPPServer , the client must provide a known user id and a valid password for that id.

There are two ways to bind: by calling Connect with a user id and password and will set the UserId and Password properties before connecting; or by setting those two properties and calling SendMessage while not connected.

IPWorksSSLException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksSSLException
Sets or retrieves a beanconfiguration setting.

Config is a generic method available in every bean. It is used to set and retrieveconfiguration settingsfor the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

IPWorksSSLException

addRecipient

public void addRecipient(int recipientType,
                         java.lang.String recipientAddress)
                  throws IPWorksSSLException
This method will add a recipient of the specified type to the recipient list.

Rather than directly manipulating the array of recipients by setting all of the necessary properties, AddRecipient method can be used as a one-line way of incrementing RecipientCount , and setting the value of the last entry in RecipientType and RecipientAddress .

For normal-type recipients, the addresses should be either a dotted IPv4 address (for sending messages to other SMS-enabled applications) or the directory number of a mobile phone. For sending messages to distributed lists, the name of the list should be used.

IPWorksSSLException

cancelMessage

public void cancelMessage(java.lang.String messageId)
                   throws IPWorksSSLException
This method will cancel the specified message.

The CancelMessage method will cancel the message stored on the SMPPServer under the value in MessageId .

IPWorksSSLException

checkLink

public void checkLink()
               throws IPWorksSSLException
This method will check the connection to the server.

The check link operation is mostly used to ensure that the host on the other end of the connection is still active, or that it is still available. While a socket connection may still be available between the client and server, the SMS application on the server may have been taken offline without releasing the socket, or the CPU may be bogged down, etc. The CheckLink method will send a PDU to the server and wait the length of Timeout for a response.

IPWorksSSLException

checkMessage

public java.lang.String checkMessage(java.lang.String messageId)
                              throws IPWorksSSLException
This method will retrieve the status of the specified message.

CheckMessage will retrieve the last known status of the message stored on the server under MessageId . For delivered messages, the response will contain the date on which the message was delivered. For erred messages, the response will contain the error code related to the failure of delivery, and the bean will throw an exception.

IPWorksSSLException

connect

public void connect(java.lang.String userId,
                    java.lang.String password)
             throws IPWorksSSLException
This method will bind as a transmitter to the SMPP service.

The Connect method will establish a socket connection to the SMPPServer and attempt to bind as a transmitter. Once the bind operation has completed, a Connected event will be fired containing the status of the connection.

IPWorksSSLException

disconnect

public void disconnect()
                throws IPWorksSSLException
This method will disconnect from the SMPP service.

Disconnect will send an unbind command close the socket connection to the SMPPServer . After a unbind operation and socket closing, a Disconnected event will be fired containing the status of the unbind operation.

IPWorksSSLException

replaceMessage

public void replaceMessage(java.lang.String messageId,
                           java.lang.String newMessage)
                    throws IPWorksSSLException
This method replaces a previously sent message with a new one.

Assuming that there is a message on the SMPPServer stored under the value in MessageId , ReplaceMessage will replace that message with the value in NewMessage .

If there is no message corresponding to MessageId , the SMS service will respond with an error message.

IPWorksSSLException

sendCommand

public byte[] sendCommand(int commandId,
                          byte[] payload)
                   throws IPWorksSSLException
This will format and send a PDU using the specified command id and payload.

The SendCommand method offers a way to do more with the bean than is directly supported. This method takes a command id and a payload, which includes every required and optional field after the header, and will create the 16-byte header for it before sending it to the server. The response PDU is returned both in the PITrail and by this method.

IPWorksSSLException

sendData

public java.lang.String sendData(byte[] data)
                          throws IPWorksSSLException
This method sends data to the Recipient .

Up to 64KB of additional data can be supplied at a time for transmission to the SMPPServer . Unlike the SendMessage method, SendData can only send to one destination at a time. The target is whatever value is in the Recipient property, which corresponds directly to the first entry in RecipientAddress .

IPWorksSSLException

sendMessage

public java.lang.String sendMessage(java.lang.String message)
                             throws IPWorksSSLException
The methods sends a message to all recipients in the recipient list.

The SendMessage will send either a single- or multi-destination message depending on the value of RecipientCount . Each entry in RecipientAddress will receive the message. The return value of SendMessage is the server-assigned id of the message. The max size of the message sent is 256 bytes.

IPWorksSSLException

addSmppsEventListener

public void addSmppsEventListener(SmppsEventListener l)
                           throws java.util.TooManyListenersException
java.util.TooManyListenersException

removeSmppsEventListener

public void removeSmppsEventListener(SmppsEventListener l)

IP*Works! SSL V6

Copyright (c) 2004 /n software inc. - All rights reserved.