com.interstarinc.xmedius.sendfax
Class SendFax

java.lang.Object
  extended by com.interstarinc.xmedius.sendfax.SendFax

public class SendFax
extends Object

Author:
mgosselin

Field Summary
protected static List<String> iors
          An ordered list to keep the list of IORs. when we find an error in connecting an IOR, we put it at the end of the list.
 
Constructor Summary
protected SendFax()
           
 
Method Summary
protected static void closeStreams(Xm.XmlGateway.File[] files, InputStream xmlDoc, Xm.InputStream xmlStream)
           
protected static Xm.XmlGateway.File createFile(FileInfo fileInfo)
           
protected static Xm.InputStream createInputStream(InputStream stream, String fileExtension)
           
protected static String[] registerIors(String[] references)
          Register the XmlGateway IORs if the IOR is not registered.
(package private) static SendResult send(com.interstarinc.xmedius.sendfax.model.v1.IFaxModel model, InputStream xmlDoc, String[] references)
           
protected static void setErrorIor(String ior)
          Put the given IOR at the end of the list.
protected static FileInfo[] toFileInfoArray(com.interstarinc.xmedius.sendfax.model.v1.IFaxModel model)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iors

protected static volatile List<String> iors
An ordered list to keep the list of IORs. when we find an error in connecting an IOR, we put it at the end of the list. So the list is ordered based on IORs with no error. Note: we considered that the IORs comes from the Trader are persistent.

Constructor Detail

SendFax

protected SendFax()
Method Detail

send

static final SendResult send(com.interstarinc.xmedius.sendfax.model.v1.IFaxModel model,
                             InputStream xmlDoc,
                             String[] references)
                      throws FaxException
Throws:
FaxException

closeStreams

protected static void closeStreams(Xm.XmlGateway.File[] files,
                                   InputStream xmlDoc,
                                   Xm.InputStream xmlStream)

createInputStream

protected static final Xm.InputStream createInputStream(InputStream stream,
                                                        String fileExtension)
                                                 throws UserException,
                                                        IOException,
                                                        Xm.JavaUtils.ServiceUnavailableX
Throws:
UserException
IOException
Xm.JavaUtils.ServiceUnavailableX

createFile

protected static final Xm.XmlGateway.File createFile(FileInfo fileInfo)
                                              throws UserException,
                                                     IOException,
                                                     Xm.JavaUtils.ServiceUnavailableX
Throws:
UserException
IOException
Xm.JavaUtils.ServiceUnavailableX

toFileInfoArray

protected static final FileInfo[] toFileInfoArray(com.interstarinc.xmedius.sendfax.model.v1.IFaxModel model)
                                           throws FaxException
Throws:
FaxException

registerIors

protected static String[] registerIors(String[] references)
Register the XmlGateway IORs if the IOR is not registered.

Parameters:
references - The IOR references.
Returns:
The registered IORs in order of IORs with no error first.

setErrorIor

protected static void setErrorIor(String ior)
Put the given IOR at the end of the list.

Parameters:
ior - XMLGateway IOR