![]() ![]()
|
Using the Command Line Interface for Push Messaging
This section provides information on using the push command line interface. The push command line tool is useful for scripting and batch processing. It enables you to manage push messages across multiple Good Intranet Servers.
Setting Up Push Messaging
The following is an overview of the steps you take to prepare for using push messaging on the command line. Step details will vary depending on how you plan to integrate push into your corporate environment.
To set up push messaging:
- Determine which hosts on your network can be used to send messages. A host machine does not have to be running Good Intranet Server to send command line push messages.
To configure additional hosts for sending pushed messages, update the push.alllowedhosts property in the Good Intranet Server properties file (install_dir\config.props) to include these hosts. For example:
push.allowedhosts host_1 host_2 host_3
For details, see Configuring Hosts
- Create a script (or some other application interface) to initiate push.
Good Intranet includes a command line utility to send push messages, but you can also include push commands in script (for example, a Perl script or .bat file).
Push commands include:
- Submit (Push)
- Cancel
- Status
- Listen
- Report
See below for a detailed description of push command syntax.
- Determine the URL location for the file or web resource that contains the push content.
- Prepare email addresses.
You can enter individual email addresses on the push command line. However, for multiple recipients, you may prefer to set up a side file or script with a list of email addresses.
- Monitor push messages as desired.
You can use the Status command to check the status of individual messages or the Report command for detailed push reports.
Invoking Push Commands
You can enter push commands directly on a command line or include it in a script. To run from the command line:
- From the Good Intranet Server installation directory, enter the following:
jre\bin\java com.good.push.tools.Command
Where Command is a specific push command with arguments. For example:
jre\bin\java com.good.push.tools.Cancel -push-id=N56679
Note: For command options that require spaces within (or between) arguments, you need to put quotes at the beginning and end of the arguments. For example, -address="jvc@office.com rmiller@oop.com"
Sending Push Messages
The Submit command sends a push message to the push server for delivery to handhelds. This message can be any content type and can be pushed to one or more handhelds (identified by email addresses).
To send a push message:
- Create a URL location that contains the push content.
- Use the following command to send a push message:
You can enter the command directly on a command line or include it in a script.
Commands (with associated arguments and options) should be entered on one line (no carriage returns).
jre\bin\java com.good.push.tools.Submit -address="address..."
-url=url_syntax [options]Push Examples
The following is an example of a push message. The commands (with associated arguments and options) are entered on one line (no carriage returns).
jre\bin\java com.good.push.tools.Submit
-address="jjones@mycompany.com" -url=file:C:\service\note.htmThis example sends the note.htm file to jjones@mycompany.com.
jre/bin/java com.good.push.tools.Submit
- address="jjones@mycompany.com marcher@mycompany.com rchen@lglegal.com" -url=file:local/alerts/help.wml -alert -title="Urgent!"This example sends the file:local/alerts/help.wml file to three recipients (jjones@mycompany.com marcher@mycompany.com rchen@lglegal.com). The message is sent as an alert with an Urgent! title.
Canceling Push Messages
The Cancel command cancels a specified push message. You can cancel the message for all recipients or for one or more specified email addresses.
To cancel a push message:
- Determine the push ID of the message you want to cancel.
- Use the following command to cancel the message:
You can enter the command directly on a command line or include it in a script.
jre/bin/java com.good.push.tools.Cancel -push-id=identifier [options]
Cancel Examples
The following are some examples of cancelling push messages. Commands (with associated arguments and options) should be entered on one line (no carriage returns).
This example cancels all deliveries of a pushed message:
- jre\bin\java com.good.push.tools.Cancel -push-id=note.576
This example cancels a pushed message for two recipients.
- jre\bin\java com.good.push.tools.Cancel -push-id=servicenote.87
-address="jchen@company.com mhoft@sct.org"Checking Push Status
The Status command queries the push server for the status of a particular push message. You can check message status for all recipients or for one or more specified email addresses.
To check the status of a pushed message:
- Determine the push ID of the message whose status you want to check.
- Use the following command to check message status:
You can enter the command directly on a command line or include it in a script.
jre\bin\java com.good.push.tools.Status -push-id=identifier [options
]When you request push status, a message similar to the following appears in the command window:
Status Response from server http://localhost:5080
Push Id : pubs.483
Address : jvc@office.com
Code : 1001
State : pending
Desc : Request has been accepted for processing
Event Time :
Address : rmiller@oop.com
Code : 1000
State : delivered
Desc : Request succeeded
Event Time : 2006-03-27T00:00:27Z
...The Code field in the status contains a code value for the server's response to the push message as sent by the push initiator. For example:
Status Examples
This example gives the status of all deliverables in a push message ServiceNote.457:
- jre/bin/java com.good.push.tools.Status -push-id=ServiceNote.457
Generating Push Reports
In addition to getting push status for individual messages, you can also generate a push report. You can generate a report on:
- All push messages in the database.
- Push messages sent to specific email addresses.
- Push messages with specific content IDs.
- Push messages in specific states.
- Push messages with specific push IDs.
- Use the following command to generate a push report.
You can enter the command directly on a command line or include it in a script.
- jre\bin\java com.good.push.tools.Report [options]
You must invoke the Report command from the Good Intranet Server installation directory or use a -dbdir option to specify the directory where the push database resides (by default this directory is install_dir/dbdir/push).
Important: The low-level push subsystem has a different history than the Push user interface that is available through the Good Intranet Server Console. The Push user interface includes a configurable history, while the Push subsystem removes push messages once they have been delivered and the user has been notified. This means that push messages successfully sent through the Push user interface could be unavailable to the Push reporting tool even though the Push user interface in the Server Console database still has a record of it.Report Output
Push reports are supplied in XML format and include the push messages that meet the selection criteria specified by Report command options. The following is an example of a push report:
![]()
Monitoring Notifications
You can use the Listen command to monitor and display result-notification messages sent by the push server. This command is useful for real-time tracking of changes in message status (for example, delivered or expired).
To monitor notifications:
- When you use the Submit command to send a pushed message, make sure you include the -notify option as part of the command. For example, use -notify=http://localhost:8081.
- Use the following command to monitor messages:
Note: You can enter the command directly on a command line or include it in a script.
jre/bin/java com.good.push.tools.Listen [-localport=port_number ]
|
Good Technology www.good.com Voice: 1 866-7-BE-GOOD sales@good.com |
![]() ![]()
|