|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.efaxdeveloper.util.outbound.DispositionCatcher
public class DispositionCatcher
DispositionCatcher application interface
Overview
Client's have the option of sending final disposition notifications to designated email recipients or as an HTTP POST request to a designated client-side endpoint as desired.
The DispositionCatcher is the interface betweeneFax Developer™
Outbound Disposition processing and a client-side disposition endpoint.When submitting an outbound request with a disposition URL passed to the
setDispositionTo(String)
method, eFax Developer™ will attempt to POST a final disposition for the outbound transmission to the designated URL.The following snippet provides an example of how the DispositionCatcher application interface might be used within a client-side process:
// Establish a PrintWriter for the response PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>OutboundDispositionServlet</title></head>"); out.println("<body>"); try { // Instantiate a new DispositionCatcher instance DispositionCatcher dc = new DispositionCatcher(request.getParameter("xml")); // Retrieve the final disposition data from the DispositionCatcher System.out.println(""); System.out.println("------------------------------------"); System.out.println("UserName: " + dc.getUserName()); System.out.println("Password: " + dc.getPassword()); System.out.println("TransmissionID: " + dc.getTransmissionID()); System.out.println("DOCID: " + dc.getDOCID()); System.out.println("FaxNumber: " + dc.getFaxNumber()); System.out.println("CompletionDate: " + dc.getCompletionDate()); System.out.println("FaxStatus: " + dc.getFaxStatus()); System.out.println("RecipientCSID: " + dc.getRecipientCSID()); System.out.println("Duration: " + dc.getDuration()); System.out.println("PagesSent: " + dc.getPagesSent()); System.out.println("NumberOfRetries: " + dc.getNumberOfRetries()); System.out.println("------------------------------------"); // Reply back to eFax Developer indicating that the final disposition // has been successfully received by your processing. out.println("Post Successful"); } catch (Exception e) { e.printStackTrace(out); } catch (Error err) { err.printStackTrace(out); } finally { // Close out the HTML response out.println("</body></html>"); out.flush(); out.close(); }
OutboundRequest
,
OutboundRequest.setDispositionTo(String)
Constructor Summary | |
---|---|
DispositionCatcher(java.lang.String dispositionXML)
Constructor method for the DispositionCatcher |
Method Summary | |
---|---|
java.lang.String |
getCompletionDate()
Method to retrieve a transmission's CompletionDate from the final disposition XML. |
java.lang.String |
getDOCID()
Method to retrieve a transmission's DOCID from the final disposition XML. |
java.lang.String |
getDuration()
Method to retrieve the transmission's Duration from the final disposition XML. |
java.lang.String |
getFaxNumber()
Method to retrieve a transmission's FaxNumber from the final disposition XML. |
java.lang.String |
getFaxStatus()
Method to retrieve a transmission's FaxStatus from the final disposition XML. |
java.lang.String |
getNumberOfRetries()
Method to retrieve the transmission's NumberOfRetries from the final disposition XML. |
java.lang.String |
getPagesSent()
Method to retrieve the transmission's PagesSent from the final disposition XML. |
java.lang.String |
getPassword()
Method to retrieve the client's outbound Password from the final disposition XML. |
java.lang.String |
getRecipientCSID()
Method to retrieve the transmission's RecipientCSID from the final disposition XML. |
java.lang.String |
getTransmissionID()
Method to retrieve the TransmissionID from the final disposition XML. |
java.lang.String |
getUserName()
Method to retrieve the client's outbound UserName from the final disposition XML. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DispositionCatcher(java.lang.String dispositionXML) throws java.lang.Exception
eFax Developer™ disposition processing will POST a parameter named "xml" to the client-specified endpoint. The client-side process will retrieve the "xml" parameter value from the request and pass it to this constructor. The DispositionCatcher will parse the XML-formatted value so that it can be easily retrieved by client-side logic via the DispositionCatcher's various accessor methods.
dispositionXML
- the XML-formatted value received from eFax Developer™
java.lang.Exception
Method Detail |
---|
public java.lang.String getCompletionDate()
public java.lang.String getDOCID()
public java.lang.String getDuration()
public java.lang.String getFaxNumber()
public java.lang.String getFaxStatus()
public java.lang.String getNumberOfRetries()
public java.lang.String getPagesSent()
public java.lang.String getPassword()
The password returned by this method will be the password value as specified in the account's Outbound Settings tab in the online user interface.
public java.lang.String getRecipientCSID()
public java.lang.String getTransmissionID()
public java.lang.String getUserName()
The user name returned by this method will be the user name value as specified in the account's Outbound Settings tab in the online user interface.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |