|
IP*Works! SSL V9 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectipworksssl.Smpps
public class Smpps
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 will bind as a transceiver, and thus can send and receive messages from the server. Additionally, 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 manipulate the Recipients collection
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 CheckMessageStatus 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 |
smppCIMD2
|
static int |
smppMessagePriorityHigh
|
static int |
smppMessagePriorityLow
|
static int |
smppMessagePriorityNormal
|
static int |
smppMessagePriorityUrgent
|
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 |
smppSMPP
|
static int |
smppVersion33
|
static int |
smppVersion34
|
static int |
smppVersion50
|
static int |
sslAutomatic
|
static int |
sslExplicit
|
static int |
sslImplicit
|
static int |
sslNone
|
| Constructor Summary | |
|---|---|
Smpps()
Creates an instance of Smpps Bean. |
|
Smpps(java.lang.String runtimeLicense)
Creates an instance of Smpps Bean with specified run-time license. |
|
| Method Summary | |
|---|---|
void |
addRecipient(int recipientType,
java.lang.String recipientAddress)
Will add a recipient of the specified type to the recipient list. |
void |
addSmppsEventListener(SmppsEventListener l)
|
void |
cancelMessage(java.lang.String messageId)
Will cancel the specified message. |
void |
checkLink()
Will check the connection to the server. |
void |
checkMessageStatus(java.lang.String messageId)
Will retrieve the status of the specified message. |
java.lang.String |
config(java.lang.String configurationString)
Sets or retrieves a {@link ipworksssl.Smpps#config configuration setting. |
void |
connect(java.lang.String userId,
java.lang.String password)
Will bind as a transceiver to the SMPP service. |
void |
disconnect()
Will disconnect from the SMPP service. |
void |
doEvents()
Processes events from the internal message queue. |
Firewall |
getFirewall()
A set of properties related to firewall access. |
java.lang.String |
getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
java.lang.String |
getMessageExpiration()
Denotes the validity period of the current message. |
java.lang.String |
getMessageId()
The identifier of the most recently sent message. |
int |
getMessagePriority()
The priority level of the current message. |
java.lang.String |
getPassword()
Contains the user's password. |
int |
getProtocol()
The SMPP protocol to be used. |
SMPPRecipientList |
getRecipients()
A list of message recipients. |
java.lang.String |
getScheduledDelivery()
Tells the server when to deliver the current message. |
java.lang.String |
getSenderAddress()
The address of the ESME. |
int |
getServiceType()
Indicates the type of service for the current message. |
int |
getSMPPPort()
This property contains the server port for secure SMPP (default 3551). |
java.lang.String |
getSMPPServer()
The SMPP entity to which the component will connect. |
int |
getSMPPVersion()
The SMPP version to be used throughout the connection. |
Certificate |
getSSLAcceptServerCert()
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate. |
Certificate |
getSSLCert()
The certificate to be used during SSL negotiation. |
Certificate |
getSSLServerCert()
The server certificate for the last established connection. |
int |
getSSLStartMode()
Determines how the bean starts the SSL negotiation. |
java.lang.String |
getSystemType()
A string representing the type of system during a connection. |
int |
getTimeout()
A timeout for the bean. |
java.lang.String |
getUserId()
Used for identification with the SMPP service. |
void |
interrupt()
Interrupt the current method. |
boolean |
isConnected()
Indicates whether or not the bean is bound. |
boolean |
isIdle()
The current status of the component. |
void |
removeSmppsEventListener(SmppsEventListener l)
|
void |
replaceMessage(java.lang.String messageId,
java.lang.String newMessage)
Replaces a previously sent message with a new one. |
byte[] |
sendCommand(int commandId,
byte[] payload)
Will format and send a PDU using the specified command identifier and payload. |
java.lang.String |
sendData(byte[] data)
Sends raw data to Recipients . |
java.lang.String |
sendMessage(java.lang.String message)
Sends a message to all recipients in the recipient list. |
void |
setFirewall(Firewall firewall)
A set of properties related to firewall access. |
void |
setLocalHost(java.lang.String localHost)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
void |
setMessageExpiration(java.lang.String messageExpiration)
Denotes the validity period of the current message. |
void |
setMessagePriority(int messagePriority)
The priority level of the current message. |
void |
setPassword(java.lang.String password)
Contains the user's password. |
void |
setProtocol(int protocol)
The SMPP protocol to be used. |
void |
setScheduledDelivery(java.lang.String scheduledDelivery)
Tells the server when to deliver the current message. |
void |
setSenderAddress(java.lang.String senderAddress)
The address of the ESME. |
void |
setServiceType(int serviceType)
Indicates the type of service for the current message. |
void |
setSMPPPort(int SMPPPort)
This property contains the server port for secure SMPP (default 3551). |
void |
setSMPPServer(java.lang.String SMPPServer)
The SMPP entity to which the component will connect. |
void |
setSMPPVersion(int SMPPVersion)
The SMPP version to be used throughout the connection. |
void |
setSSLAcceptServerCert(Certificate SSLAcceptServerCert)
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate. |
void |
setSSLCert(Certificate SSLCert)
The certificate to be used during SSL negotiation. |
void |
setSSLStartMode(int SSLStartMode)
Determines how the bean starts the SSL negotiation. |
void |
setSystemType(java.lang.String systemType)
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)
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 |
|---|
public static final int smppMessagePriorityLow
public static final int smppMessagePriorityNormal
public static final int smppMessagePriorityHigh
public static final int smppMessagePriorityUrgent
public static final int smppSMPP
public static final int smppCIMD2
public static final int smppServiceDefault
public static final int smppServiceCMT
public static final int smppServiceCPT
public static final int smppServiceVMN
public static final int smppServiceVMA
public static final int smppServiceWAP
public static final int smppServiceUSSD
public static final int smppServiceCBS
public static final int smppVersion50
public static final int smppVersion34
public static final int smppVersion33
public static final int sslAutomatic
public static final int sslImplicit
public static final int sslExplicit
public static final int sslNone
| Constructor Detail |
|---|
public Smpps()
public Smpps(java.lang.String runtimeLicense)
| Method Detail |
|---|
public boolean isConnected()
The value of this property indicates 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
identifier and password which will set the UserId and Password properties before connecting; or by setting those two properties
and calling SendMessage while not connected.
public Firewall getFirewall()
This is a Firewall type property which
contains fields describing the firewall
through which the bean will attempt to connect.
public void setFirewall(Firewall firewall)
throws IPWorksSSLException
This is a Firewall type property which
contains fields describing the firewall
through which the bean will attempt to connect.
IPWorksSSLExceptionpublic boolean isIdle()
Idle will be False if the component is currently busy (communicating
and/or waiting for an answer), and True at all other times.
public java.lang.String getLocalHost()
The LocalHost property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multi-homed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
public void setLocalHost(java.lang.String localHost)
throws IPWorksSSLException
The LocalHost property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multi-homed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
IPWorksSSLExceptionpublic java.lang.String getMessageExpiration()
This 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:
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".
public void setMessageExpiration(java.lang.String messageExpiration)
throws IPWorksSSLException
This 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:
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".
IPWorksSSLExceptionpublic java.lang.String getMessageId()
This property indicates the identifier of the most recently sent message. After a successful call to SendMessage , this
property will be set to the server-assigned id of that message.
public int getMessagePriority()
When sending a message, this 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.
public void setMessagePriority(int messagePriority)
throws IPWorksSSLException
When sending a message, this 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.
IPWorksSSLExceptionpublic java.lang.String getPassword()
This property contains the user's password. When binding to the SMPPServer , the client must provide
a known user identifier and a valid password for that ID.
There are two ways to bind: by calling Connect with a user
identifier and password which will set the UserId and this property
properties before connecting; or by setting those two properties
and calling SendMessage while not connected.
public void setPassword(java.lang.String password)
throws IPWorksSSLException
This property contains the user's password. When binding to the SMPPServer , the client must provide
a known user identifier and a valid password for that ID.
There are two ways to bind: by calling Connect with a user
identifier and password which will set the UserId and this property
properties before connecting; or by setting those two properties
and calling SendMessage while not connected.
IPWorksSSLExceptionpublic int getProtocol()
This property defines the protocol to be used when connecting to the server. Possible values are:
public void setProtocol(int protocol)
throws IPWorksSSLException
This property defines the protocol to be used when connecting to the server. Possible values are:
IPWorksSSLExceptionpublic SMPPRecipientList getRecipients()
This property is used to specify the recipient(s)
of the message. Each recipient is represented by an smpprecipient type, which contains fields for the address and type of address for the recipient.
There is an AddRecipient method which also
may be used to add recipients to this collection
property.
This collection is indexed from 0 to size - 1.
public java.lang.String getScheduledDelivery()
This property 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:
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".
public void setScheduledDelivery(java.lang.String scheduledDelivery)
throws IPWorksSSLException
This property 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:
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".
IPWorksSSLExceptionpublic java.lang.String getSenderAddress()
This property contains the address of the ESME. The SMPP protocol allows an External Short Messaging Entity (ESME) to specify its
address, whether it is a phone number or an IP address. If This property
is not set, the bean will default to the value in LocalHost .
public void setSenderAddress(java.lang.String senderAddress)
throws IPWorksSSLException
This property contains the address of the ESME. The SMPP protocol allows an External Short Messaging Entity (ESME) to specify its
address, whether it is a phone number or an IP address. If This property
is not set, the bean will default to the value in LocalHost .
IPWorksSSLExceptionpublic int getServiceType()
When sending messages, this 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:
public void setServiceType(int serviceType)
throws IPWorksSSLException
When sending messages, this 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:
IPWorksSSLExceptionpublic int getSMPPPort()
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.
public void setSMPPPort(int SMPPPort)
throws IPWorksSSLException
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.
IPWorksSSLExceptionpublic java.lang.String getSMPPServer()
This property is the instant messaging server to which the bean will connect
when the Connect method is called. This property must
contain a valid SMPP service application address.
public void setSMPPServer(java.lang.String SMPPServer)
throws IPWorksSSLException
This property is the instant messaging server to which the bean will connect
when the Connect method is called. This property must
contain a valid SMPP service application address.
IPWorksSSLExceptionpublic int getSMPPVersion()
This property contains 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.
public void setSMPPVersion(int SMPPVersion)
throws IPWorksSSLException
This property contains 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.
IPWorksSSLExceptionpublic Certificate getSSLAcceptServerCert()
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, this property may create a security breach. Use it at your own risk.
public void setSSLAcceptServerCert(Certificate SSLAcceptServerCert)
throws IPWorksSSLException
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, this property may create a security breach. Use it at your own risk.
IPWorksSSLExceptionpublic Certificate getSSLCert()
The digital certificate that the bean will use
during SSL negotiation. Set this property to a valid
certificate before starting SSL negotiation. To set
a certificate, you may set the Encoded field to
the encoded certificate. To select a certificate, use
the store and subject fields.
public void setSSLCert(Certificate SSLCert)
throws IPWorksSSLException
The digital certificate that the bean will use
during SSL negotiation. Set this property to a valid
certificate before starting SSL negotiation. To set
a certificate, you may set the Encoded field to
the encoded certificate. To select a certificate, use
the store and subject fields.
IPWorksSSLExceptionpublic Certificate getSSLServerCert()
SSLServerCert contains the server certificate for the
last established connection.
SSLServerCert is reset every time a new connection is attempted.
public int getSSLStartMode()
The SSLStartMode property may have one of the following values:
SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit
( sslImplicit ).
public void setSSLStartMode(int SSLStartMode)
throws IPWorksSSLException
The SSLStartMode property may have one of the following values:
SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit
( sslImplicit ).
IPWorksSSLExceptionpublic java.lang.String getSystemType()
This property contains 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.
public void setSystemType(java.lang.String systemType)
throws IPWorksSSLException
This property contains 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.
IPWorksSSLExceptionpublic int getTimeout()
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 exception.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout seconds when
any amount of 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 the ipworksssl.Smpps#config configuration setting.
The default value for the {@link ipworksssl.Smpps#getTimeout Timeout} property is 60 (seconds).
public void setTimeout(int timeout)
throws IPWorksSSLException
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 exception.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout seconds when
any amount of 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 the ipworksssl.Smpps#config configuration setting.
The default value for the {@link ipworksssl.Smpps#getTimeout Timeout} property is 60 (seconds).
IPWorksSSLExceptionpublic java.lang.String getUserId()
This property is used for identification with the SMPP service. When binding to the SMPPServer , the client must provide
a known user identifier 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.
public void setUserId(java.lang.String userId)
throws IPWorksSSLException
This property is used for identification with the SMPP service. When binding to the SMPPServer , the client must provide
a known user identifier 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
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. 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.
Valid values for RecipientType are:
IPWorksSSLException
public void cancelMessage(java.lang.String messageId)
throws IPWorksSSLException
This method will cancel the message stored on the SMPPServer under the value in MessageId .
IPWorksSSLException
public void checkLink()
throws IPWorksSSLException
This method will check the connection to the server. This method is 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. This method will send a PDU to the server and wait
the length of Timeout for a response.
IPWorksSSLException
public void checkMessageStatus(java.lang.String messageId)
throws IPWorksSSLException
This method will retrieve the last known status of the message stored on the server under MessageId . The bean will fire a MessageStatus containing the parsed response from the server.
IPWorksSSLException
public java.lang.String config(java.lang.String configurationString)
throws IPWorksSSLException
{@link ipworksssl.Smpps#config Config} is a generic method available in every bean. It is used to set and retrieve {@link ipworksssl.Smpps#config configuration settingsfor the bean.
These 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 {@link ipworksssl.Smpps#config 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 {@link ipworksssl.Smpps#config configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.
The bean accepts one or more of the following configuration settings . 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 {@link ipworksssl.Smpps#config Config} method.
Note 2: It is likely that the addr_range field is not supported or deliberately ignored on most Message Centres. The reason for this is that most carriers will not allow an ESME control the message routing as this can carry the risk of mis-routing messages. In such circumstances, the ESME will be requested to set the field to NULL.
Note that this is advanced functionality, and the bean does not verify the data in this configuration setting prior to transmission. After the bean internally decodes the string back into binary, it is passed on inside the PDU as-is without validation or modification.
This setting is only applicable when using the {@link ipworksssl.Smpps#sendMessage SendMessage} or {@link ipworksssl.Smpps#sendData SendData} methods.
NOTE: This is the same as Host . This setting is provided for use by beans that do not directly expose Firewall properties.
{@link ipworksssl.Smpps#getRemotePort RemotePort} is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The binding (address and port) is provided through the {@link ipworksssl.SmppsConnectionStatusEvent ConnectionStatus} event.
The connection to the firewall is made by calling the {@link ipworksssl.Smpps#connect Connect} method.
In the second scenario, {@link ipworksssl.Smpps#config is a positive value, the system will attempt to send pending data until the specified {@link ipworksssl.Smpps#config is reached. If this attempt fails, then the system will reset the connection.
The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).
Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.
If the bean is connected, the {@link ipworksssl.Smpps#getLocalHost LocalHost} setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).
{@link ipworksssl.Smpps#getLocalPort LocalPort} cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.
This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.
If no {@link ipworksssl.Smpps#getEOL EOL} is found, and {@link ipworksssl.Smpps#config bytes are accumulated in the buffer, the {@link ipworksssl.SmppsDataInEvent DataIn} event is fired with the EOL parameter set to False, and the buffer is reset.
The minimum value for {@link ipworksssl.Smpps#config is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.
Use this setting with caution. Requesting a lower cipher strength than necessary could potentially cause serious security vulnerabilities in your application.
When the provider is OpenSSL, SSLCipherStrength is currently not supported. This functionality is instead made available through the {@link ipworksssl.Smpps#config config setting.
When the provider is OpenSSL, SSLCipherStrength is currently not supported. This functionality is instead made available through the {@link ipworksssl.Smpps#config config setting.
TLS 1.1 and TLS1.2 support are only available starting with Windows 7.
The special value "*" (default) picks the default SSL provider defined in the system.
Note: On Windows systems, the default SSL Provider is "Microsoft Unified Security Protocol Provider" and cannot be changed.
The special value "*" means that the component will pick all of the supported cipher suites. If SSLEnabledCipherSuites is set to any other value, only the specified cipher suites will be considered.
Multiple cipher suites are separated by semicolons.
Example values:
obj.config("SSLEnabledCipherSuites=*");
obj.config("SSLEnabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA");
obj.config("SSLEnabledCipherSuites=SSL_RSA_WITH_RC4_128_SHA; SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"); Possible values include:
SSLEnabledCipherSuites is used together with SSLCipherStrength .
Note: This configuration setting is available only in .NET and Java.
obj.Config("SSLEnabledProtocols=3072"); // TLS1.2 (supports SHA_256)
obj.Config("SSLAlgorithmList=CALG_SHA_256;CALG_MD5"); Possible values include:
This option is only valid in Windows.
IPWorksSSLException
public void connect(java.lang.String userId,
java.lang.String password)
throws IPWorksSSLException
This method will establish a socket connection to
the SMPPServer and attempt to bind as a transceiver. Once
the bind operation has completed, a Connected event will
be fired containing the status of the connection.
IPWorksSSLException
public void disconnect()
throws IPWorksSSLException
This method will send an unbind command and 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
public void doEvents()
throws IPWorksSSLException
When this method is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.
IPWorksSSLException
public void interrupt()
throws IPWorksSSLException
If there is no method in progress, Interrupt simply returns, doing nothing.
IPWorksSSLException
public void replaceMessage(java.lang.String messageId,
java.lang.String newMessage)
throws IPWorksSSLException
Assuming that there is a message on the SMPPServer stored under
the value in MessageId , this method 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
public byte[] sendCommand(int commandId,
byte[] payload)
throws IPWorksSSLException
This method offers a way to do more with the bean than is directly supported. This method takes a command identifier 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
public java.lang.String sendData(byte[] data)
throws IPWorksSSLException
Recipients .
This method sends raw data to Recipients . Up to 64KB of additional data can be supplied at a time for
transmission to the SMPPServer . Unlike the SendMessage method, this method can only send to one destination at a
time. The target is whatever value is in the Recipients collection
.
IPWorksSSLException
public java.lang.String sendMessage(java.lang.String message)
throws IPWorksSSLException
The methods sends a message to all recipients in the recipient list. The return value of this method is the server-assigned identifier of the message. The max size of the message sent is 256 bytes.
IPWorksSSLException
public void addSmppsEventListener(SmppsEventListener l)
throws java.util.TooManyListenersException
java.util.TooManyListenersExceptionpublic void removeSmppsEventListener(SmppsEventListener l)
|
IP*Works! SSL V9 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||