com.arch.wctp
Class WctpClientReceive

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

public class WctpClientReceive
extends WctpFactory

WctpClientReceive
Contains functionality to work with responses recieved from a WCTP gateway.
This is beta software that is still in development. Use at your own risk.


New from the previous version 1.1 Beta:
* This class now extends WctpFactory * Both methods used to read server responses have been moved to WctpFactory * This class now checks for a reply in a ClientQueryResponse using method checkForReply(String)

Copyright 2000-2001 Arch Wireless Holdings, Inc.

Version:
1.2 Beta August 17, 2001

Constructor Summary
WctpClientReceive()
           
 
Method Summary
 java.lang.String checkForReply(java.lang.String response)
          This method checks a ClientQueryResponse for a reply.
 boolean checkIfDelivered(java.lang.String response)
          This method checks to see if a message has been delivered.
 boolean checkIfQueued(java.lang.String response)
          This method checks to see if the message has been queued.
 java.lang.String findCode(int wctpCode)
          Version 1.1 Error and Success Code definitions
 int getResponseCode(java.lang.String inputLine)
          Extracts an error or success code from a WCTP packet
and gives an appropriate message
 java.lang.String getToken(java.lang.String inputLine)
          Get's a token from a WCTP packet.
 java.lang.String getTrackingCode(java.lang.String inputLine)
          Extracts a tracking code from a XML document
and gives an appropriate response message.
 
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

WctpClientReceive

public WctpClientReceive()
Method Detail

checkIfDelivered

public boolean checkIfDelivered(java.lang.String response)
This method checks to see if a message has been delivered. Creation date: (4/11/2001 9:25:08 AM)
Parameters:
response - java.lang.String the entire response XML received from a server.
Returns:
boolean

checkIfQueued

public boolean checkIfQueued(java.lang.String response)
This method checks to see if the message has been queued. In some cases, it may be more efficient to only use checkIfDelivered. Creation date: (4/11/2001 9:24:45 AM)
Parameters:
response - java.lang.String the entire response XML received from a server.
Returns:
boolean

findCode

public java.lang.String findCode(int wctpCode)
Version 1.1 Error and Success Code definitions
Parameters:
wctpCode - the wctp code
Returns:
the definition of the code

getResponseCode

public int getResponseCode(java.lang.String inputLine)
Extracts an error or success code from a WCTP packet
and gives an appropriate message
Parameters:
inputLine - an XML document generated by the WCTP gateway
Returns:
the error/success code, or -1 if neither are found

getToken

public java.lang.String getToken(java.lang.String inputLine)
Get's a token from a WCTP packet. (Version 1.1 or later) Creation date: (4/2/2001 9:39:25 AM)
Parameters:
body - java.lang.String the entire XML packet received from a server.
Returns:
java.lang.String

getTrackingCode

public java.lang.String getTrackingCode(java.lang.String inputLine)
Extracts a tracking code from a XML document
and gives an appropriate response message.
Parameters:
inputLine - an XML document generated by the WCTP gateway
Returns:
the tracking code, or null if it's not found

checkForReply

public java.lang.String checkForReply(java.lang.String response)
This method checks a ClientQueryResponse for a reply.
Parameters:
response - java.lang.String the entire response XML received from a server.
Returns:
String the payload of the reply, or null if no string was found.