Contents
This topic describes how to run the sample application for the TIBCO StreamBase® Short Message Peer-to-Peer Protocol (SMPP) Adapter.
The sample, SMPPSimpleSample.sbapp
, demonstrates how to
connect to a message center and send short messages.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
SMPP
to narrow the list of options. -
Select Short Message Peer-to-Peer Protocol (SMPP) Adapter from the StreamBase Standard Adapters category.
-
Click OK.
StreamBase Studio creates a single project for the SMPP adapter samples in your current Studio workspace.
Run this sample in Studio as follows:
-
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Updating
,Downloading
,Building
, orRebuild project
messages finish before you proceed. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
SMPPSimpleSample.sbapp
application. -
Make sure the application is the currently active tab in the EventFlow Editor, then click the Run button. This opens the SB Test/Debug perspective and starts the application.
-
In the Manual Input view, select the ControlInput stream and type
connect
in the command field.-
In the Fields section, enter an instanceId or let the sample generate one for you.
-
Enter your information (host, port, and so on) to connect to an External Short Message Entity (ESME) or Message Center (MC).
-
-
Click
. In the Output Streams view, look for theConnected
at control status output. -
In the Manual Input view, select the DataInput stream.
-
Click the plus sign next to (list) to expand the data Elements fields.
-
In the Fields section: enter either the instanceId you supplied earlier, or the instanceId that the sample generated for you.
-
Enter a simple message as well as the sender and destination information.
-
-
Click
. In the Output Streams view, look forMessage Submitted
andDelivery
(if the delivery report is enabled on the server side) at data status output. -
In the Manual Input view, select the ControlInput stream.
-
Enter
disconnect
into the command field. -
Enter the same instanceId as before.
-
-
Click
. In the Output Streams view, look for theDisconnected
status output. -
When done, press F9 or click the Stop Running Application button.
Use the control port to send action commands to the adapter. Tuples enqueued on this port connect or disconnect the adapter to the message center, as well as list all existing sessions.
Command, string: the command to send to the adapter.
The values are:
-
Connect — Notifies the adapter to connect to External Short Message Entity (ESME) or Message Center (MC).
-
Disconnect — Notifies the adapter to disconnect from the External Short Message Entity (ESME) or Message Center (MC) (if a connection to that URI already exists).
-
List — Lists all existing sessions.
When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.
Important
Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.
Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:
studio-workspace
/sample_adapter_embedded_SMPP
See Default Installation
Directories for the default location of studio-workspace
on your system.