com.bankframe.ei.comms
Class EXMLServletCommsManager

java.lang.Object
  extended bycom.bankframe.ei.comms.ECommsManager
      extended bycom.bankframe.ei.comms.EXMLServletCommsManager

Deprecated. use com.bankframe.ei.channel.server.HttpServer instead

public class EXMLServletCommsManager
extends ECommsManager

This class is the XML Comms Manager. It handles the unformatting of XML requests over HTTP into DataPacket objects. It also handles the formatting of DataPackets back into an XML string and the return sending of the XML back to the requesting client.


Constructor Summary
EXMLServletCommsManager(java.lang.String name, javax.servlet.ServletResponse media)
          Deprecated. EXMLServletCommsManager Constructor.
 
Method Summary
 java.util.Vector format(java.util.Vector dataPackets)
          Deprecated. This method formats a Vector of DataPackets for sending on the XML comms protocol.
 java.util.Vector sendDataPacket(DataPacket data)
          Deprecated. This is a wrapper method for sending an XML Document to a client.
 java.util.Vector sendDataPackets(java.util.Vector dataPackets)
          Deprecated. This is a wrapper method for sending an XML Document to a client.
 java.util.Vector unformat(java.lang.Object dataSource)
          Deprecated. This method unformats a request object containing an XML doc.
 
Methods inherited from class com.bankframe.ei.comms.ECommsManager
breakUpString, convertVectorPairsToDataPacket, getDelimiter, getName, setDelimiter, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EXMLServletCommsManager

public EXMLServletCommsManager(java.lang.String name,
                               javax.servlet.ServletResponse media)
Deprecated. 
EXMLServletCommsManager Constructor. Store the name of this constructor and the ServletResponse object obtained from the requesting client.

Parameters:
name - String is this Comms Manager's name
media - ServletResponse through which servlet's reponse is sent
Method Detail

format

public java.util.Vector format(java.util.Vector dataPackets)
Deprecated. 
This method formats a Vector of DataPackets for sending on the XML comms protocol. The Vector is first parsed into a BankFrame XML Document using an EDocumentBuilder. Then (if necessary) it is transformed into the same XML format that the client requested, using an EDocumentTransformer object. Since we must return a Vector, the returned Vector contains one element, which is an XML Document to be sent to the client.

Specified by:
format in class ECommsManager
Parameters:
dataPackets - Vector of DataPackets to be formatted into an XML Document
Returns:
Vector contains one XML Document formatted to the client's XML dtd.

sendDataPacket

public java.util.Vector sendDataPacket(DataPacket data)
Deprecated. 
This is a wrapper method for sending an XML Document to a client. The DataPacket must contain a single XML Document which will be sent to the client. The key name to retrieve this Document must be "xml". The XML Document is embedded within a Vector and control is then passed to the sendDataPackets method. (In the XML Channel Server, this method is never used. It is provided for backward compatibility only)

Overrides:
sendDataPacket in class ECommsManager
Parameters:
data - A DataPacket containing one XML Document element
Returns:
A Vector containing the XML Document.

sendDataPackets

public java.util.Vector sendDataPackets(java.util.Vector dataPackets)
Deprecated. 
This is a wrapper method for sending an XML Document to a client. The Vector must contain a single XML Document as it's only element. If the Vector does not contain a valid XML Document, an XML Document containing an error message is created and sent to the client. This Document is retrieved and sent to the client via the send(Document) method.

Overrides:
sendDataPackets in class ECommsManager
Parameters:
dataPackets - A Vector containing one XML Document element
Returns:
The same Vector that was passed in.

unformat

public java.util.Vector unformat(java.lang.Object dataSource)
Deprecated. 
This method unformats a request object containing an XML doc. The XML data is first extracted from the data source. It then uses an EDocumentBuilder class to parse the XML into a DOM object, uses an EDocumentTransformer to transform the XML into BankFrame XML format (if necessary), then uses a DataPacketBuilder instance to transform the BankFrame XML into a DataPacket object. If any stage of the unformatting fails, a null value will be returned, causing the requesting servlet to throw servlet exception.

Specified by:
unformat in class ECommsManager
Parameters:
dataSource - Object to be unformatted
Returns:
Vector of the unformatted data


Copyright © 2005, 2007, Oracle. All rights reserved.