com.arch.wctp
Class WctpClientOperations

java.lang.Object
  |
  +--com.arch.wctp.WctpFactory
        |
        +--com.arch.wctp.WctpClientOperations

public class WctpClientOperations
extends WctpFactory

WctpClientOperations
Contains functionality to format WCTP Client packets.
This is beta software that is still in development. Use at your own risk.

New in this version:
* Fixed a bug that existed in all methods that generate MCR choices. The bug caused bad the creation of bad XML.

New from the previous version 1.1 Beta:
* The method versionQuery(String, boolean) has been added to allow the user to specify if DTDs should be listed.

Copyright 2000-2001, Arch Wireless Holdings, Inc.

Version:
1.2 Beta August 17, 2001

Constructor Summary
WctpClientOperations()
           
 
Method Summary
 java.lang.String clientQuery(java.lang.String deviceID, java.lang.String trackNo, java.lang.String senderID)
          Formats the WCTP packet for a Client Query
 java.lang.String submitBinaryMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String payload, java.lang.String senderID)
          Formats the WCTP packet for a Submit Client Message in Binary Format
 java.lang.String submitMCRMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID, java.lang.String[] choices)
          Formats the WCTP packet for a Submit Client Message with MCR.
 java.lang.String submitMCRMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID, java.lang.String[] choices, boolean receipt)
          Formats the WCTP packet for a Submit Client Message with MCR.
 java.lang.String submitMCRMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID, java.lang.String[] choices, boolean receipt, boolean preformatted)
          Formats the WCTP packet for a Submit Client Message with MCR
 java.lang.String submitMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID)
          Formats the WCTP packet for a Submit Client Message.
 java.lang.String submitMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID, boolean receipt)
          Formats the WCTP packet for a Submit Client Message.
 java.lang.String submitMessage(java.lang.String timeStmp, java.lang.String deviceID, java.lang.String mssg, java.lang.String senderID, boolean receipt, boolean preformatted)
          Formats the WCTP packet for a Submit Client Message
 java.lang.String versionQuery(java.lang.String inquirer)
          This method formats a WCTP packet for a VersionQuery.
 java.lang.String versionQuery(java.lang.String inquirer, boolean listDTDs)
          This method formats a WCTP packet for a VersionQuery.
 
Methods inherited from class com.arch.wctp.WctpFactory
convertAll, convertAmp, convertApos, convertCR, convertGreaterThan, convertLessThan, convertLF, convertQuote, getTimestamp, readByteResponse, readResponse, sendWctpPacket, sendWctpPacket, sendWctpPacket
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WctpClientOperations

public WctpClientOperations()
Method Detail

clientQuery

public java.lang.String clientQuery(java.lang.String deviceID,
                                    java.lang.String trackNo,
                                    java.lang.String senderID)
Formats the WCTP packet for a Client Query
Parameters:
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
trackNo - the tracking number for the message
senderID - the sending users ID (i.e. Email Address, pager pin number, alias
Returns:
the xml document

submitBinaryMessage

public java.lang.String submitBinaryMessage(java.lang.String timeStmp,
                                            java.lang.String deviceID,
                                            java.lang.String payload,
                                            java.lang.String senderID)
Formats the WCTP packet for a Submit Client Message in Binary Format
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
payload - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias
Returns:
the xml document

submitMCRMessage

public java.lang.String submitMCRMessage(java.lang.String timeStmp,
                                         java.lang.String deviceID,
                                         java.lang.String mssg,
                                         java.lang.String senderID,
                                         java.lang.String[] choices)
Formats the WCTP packet for a Submit Client Message with MCR. This method assumes that you do not want to later come back with a client query to check for a receipt and that you do not need the message to be preformatted.
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias
choices - a String array of MCR entries
Returns:
the xml document, or an empty string if the deviceID was left blank

submitMessage

public java.lang.String submitMessage(java.lang.String timeStmp,
                                      java.lang.String deviceID,
                                      java.lang.String mssg,
                                      java.lang.String senderID,
                                      boolean receipt)
Formats the WCTP packet for a Submit Client Message. This method assuumes that you don't want the message preformatted.
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias)
receipt - Do you want a receipt to later check with clientQuery?
Returns:
the xml document

submitMessage

public java.lang.String submitMessage(java.lang.String timeStmp,
                                      java.lang.String deviceID,
                                      java.lang.String mssg,
                                      java.lang.String senderID,
                                      boolean receipt,
                                      boolean preformatted)
Formats the WCTP packet for a Submit Client Message
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias)
receipt - Do you want a receipt to later check with clientQuery?
preformatted - Do you want the payload to be preformatted? (Preserve whitespace, etc.) Please see the note about preformatted in the main documentation of this class.
Returns:
the xml document

versionQuery

public java.lang.String versionQuery(java.lang.String inquirer)
This method formats a WCTP packet for a VersionQuery. Creation date: (4/2/2001 9:45:18 AM)
Parameters:
inquirer - java.lang.String your domain or a some other means to identify yourself.
Returns:
java.lang.String the XML packet

submitMCRMessage

public java.lang.String submitMCRMessage(java.lang.String timeStmp,
                                         java.lang.String deviceID,
                                         java.lang.String mssg,
                                         java.lang.String senderID,
                                         java.lang.String[] choices,
                                         boolean receipt)
Formats the WCTP packet for a Submit Client Message with MCR. This method assumes that you do not want the payload preformatted.
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias
choices - a String array of MCR entries
receipt - Do you want a receipt to later check with clientQuery?
Returns:
the xml document, or an empty string if the deviceID was left blank

submitMCRMessage

public java.lang.String submitMCRMessage(java.lang.String timeStmp,
                                         java.lang.String deviceID,
                                         java.lang.String mssg,
                                         java.lang.String senderID,
                                         java.lang.String[] choices,
                                         boolean receipt,
                                         boolean preformatted)
Formats the WCTP packet for a Submit Client Message with MCR
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias
choices - a String array of MCR entries
receipt - Do you want a receipt to later check with clientQuery?
preformatted - Do you want the payload to be preformatted? (Preserve whitespace, etc.) Please see the note about preformatted in the main documentation of this class.
Returns:
the xml document, or an empty string if the deviceID was left blank

submitMessage

public java.lang.String submitMessage(java.lang.String timeStmp,
                                      java.lang.String deviceID,
                                      java.lang.String mssg,
                                      java.lang.String senderID)
Formats the WCTP packet for a Submit Client Message. This method assumes that you do not want to later come back with a client query to check for a receipt and that you do not need the message to be preformatted. not want notification of delivery (receipt.)
Parameters:
timeStmp - the correctly formatted time stamp
deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias
mssg - the message being sent to the pager
senderID - the sending users ID (i.e. Email Address, pager pin number, alias)
Returns:
the xml document

versionQuery

public java.lang.String versionQuery(java.lang.String inquirer,
                                     boolean listDTDs)
This method formats a WCTP packet for a VersionQuery. Creation date: (4/2/2001 9:45:18 AM)
Parameters:
inquirer - java.lang.String your domain or a some other means to identify yourself.
listDTDs - boolean true if you want to list supported DTDs
Returns:
java.lang.String the XML packet