wt.wrmf.delivery
Class StandardShippingService

java.lang.Object
  extended by wt.services.StandardManager
      extended by wt.wrmf.delivery.StandardShippingService
All Implemented Interfaces:
Serializable, NetFactor, wt.services.Manager, ShippingService

public class StandardShippingService
extends StandardManager
implements ShippingService, Serializable

Use the newStandardShippingService static factory method(s), not the StandardShippingService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 wt.wrmf.delivery.TrackingID iasPullContent(String iasUrl, String transportType, wt.wrmf.delivery.MethodInvocationDesc localAction, String queryStr, String pullMethod, String outboxName, String inboxName)
          For I2W/W2I project only.
 InputStream iasPullContentImmediate(String iasUrl, String transportType, wt.wrmf.delivery.MethodInvocationDesc localAction, String queryStr, String pullMethod)
          For I2W/W2I project only.
 InputStream sendImmediateItem(wt.wrmf.delivery.ShippingItem obj, wt.wrmf.delivery.SiteAddress to, wt.wrmf.delivery.TransportType transportType)
          The return type is defaulted to "INDIRECT" mode, this means the InputStream from the remote site will be executed by the MethodInvocationDesc attached to the ShippingItem.
 InputStream sendImmediateItem(wt.wrmf.delivery.ShippingItem obj, wt.wrmf.delivery.SiteAddress to, wt.wrmf.delivery.TransportType transportType, int returnType)
          Delivery Type: IMMEDIATE is used by default in this invocation, and it is the only method for this delivery type.
 wt.wrmf.delivery.TrackingID sendItem(wt.wrmf.delivery.ShippingItem obj, wt.wrmf.delivery.ShippingLabel toLabel)
          All Delivery Type except IMMEDIATE mode use this invocation.
 wt.wrmf.delivery.TrackingID sendItem(wt.wrmf.delivery.ShippingItem obj, wt.wrmf.delivery.ShippingLabel toLabel, wt.wrmf.delivery.ShippingLabel receiptLabel)
          All Delivery Type except IMMEDIATE mode use this invocation.
 
Methods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

sendItem

public wt.wrmf.delivery.TrackingID sendItem(wt.wrmf.delivery.ShippingItem obj,
                                            wt.wrmf.delivery.ShippingLabel toLabel)
                                     throws wt.wrmf.delivery.WTDeliveryException
All Delivery Type except IMMEDIATE mode use this invocation. The associated Outbox, which can not be TransparentOutbox, and associated Inbox must be pre-specified in order to initialize inbox and outbox hashtables correctly. ShippingItems will be stored into database.

Supported API: true

Specified by:
sendItem in interface ShippingService
Parameters:
obj -
toLabel -
Returns:
TrackingID
Throws:
wt.wrmf.delivery.WTDeliveryException

sendItem

public wt.wrmf.delivery.TrackingID sendItem(wt.wrmf.delivery.ShippingItem obj,
                                            wt.wrmf.delivery.ShippingLabel toLabel,
                                            wt.wrmf.delivery.ShippingLabel receiptLabel)
                                     throws wt.wrmf.delivery.WTDeliveryException
All Delivery Type except IMMEDIATE mode use this invocation. The associated Outbox, which can not be TransparentOutbox, and associated Inbox must be pre-specified in order to initialize inbox and outbox hashtables correctly. ShippingItems will be stored into database.

Supported API: true

Specified by:
sendItem in interface ShippingService
Parameters:
obj -
toLabel -
receiptLabel -
Returns:
TrackingID
Throws:
wt.wrmf.delivery.WTDeliveryException

sendImmediateItem

public InputStream sendImmediateItem(wt.wrmf.delivery.ShippingItem obj,
                                     wt.wrmf.delivery.SiteAddress to,
                                     wt.wrmf.delivery.TransportType transportType)
                              throws wt.wrmf.delivery.WTDeliveryException
The return type is defaulted to "INDIRECT" mode, this means the InputStream from the remote site will be executed by the MethodInvocationDesc attached to the ShippingItem. A null input stream in this case will be returned (since it is already consumed)

Supported API: true

Specified by:
sendImmediateItem in interface ShippingService
Parameters:
obj -
to -
transportType -
Returns:
InputStream
Throws:
wt.wrmf.delivery.WTDeliveryException

sendImmediateItem

public InputStream sendImmediateItem(wt.wrmf.delivery.ShippingItem obj,
                                     wt.wrmf.delivery.SiteAddress to,
                                     wt.wrmf.delivery.TransportType transportType,
                                     int returnType)
                              throws wt.wrmf.delivery.WTDeliveryException
Delivery Type: IMMEDIATE is used by default in this invocation, and it is the only method for this delivery type. The associated Outbox is TransparentOutbox, and the associated Inbox is TransparentInbox, by default. The returned Object "InputStream" is designed for flexibility for different requirements/preference. Normally this is associated with the setting of the boolean attribute "returnType" in from the attached ShippingLabel object: If it is set to INDIRECT (default case), the received InputStream from remote site will be executed "implicitly" by invoking the method described in MethodInvocationDesc object, which is attached to this ShippingItem. hence this method will return null; otherwise if set to DIRECT, the MethodInvocationDesc object attached will be ignored and the InputStream from the remote site will be returned directly..

Supported API: true

Specified by:
sendImmediateItem in interface ShippingService
Parameters:
obj -
to -
transportType -
returnType -
Returns:
InputStream
Throws:
wt.wrmf.delivery.WTDeliveryException

iasPullContentImmediate

public InputStream iasPullContentImmediate(String iasUrl,
                                           String transportType,
                                           wt.wrmf.delivery.MethodInvocationDesc localAction,
                                           String queryStr,
                                           String pullMethod)
                                    throws wt.wrmf.delivery.WTDeliveryException
For I2W/W2I project only. This is an alternative but more convenient method of sendItemImmediate().

Supported API: true

Specified by:
iasPullContentImmediate in interface ShippingService
Parameters:
iasUrl - The site address of the IAS servlet
transportType - By default this is "GZIPHttpPipe" which can be overwrite by system configuration
localAction - To specify how to handle the input stream downloaded
queryStr - Query information to locate the source stream at remote site
pullMethod - The method how to retrieve the stream. By default the signatures are HttpServletRequest and HttpServletResponse, otherwise the signature types and values must be included in the "queryStr"
Returns:
InputStream
Throws:
wt.wrmf.delivery.WTDeliveryException

iasPullContent

public wt.wrmf.delivery.TrackingID iasPullContent(String iasUrl,
                                                  String transportType,
                                                  wt.wrmf.delivery.MethodInvocationDesc localAction,
                                                  String queryStr,
                                                  String pullMethod,
                                                  String outboxName,
                                                  String inboxName)
                                           throws wt.wrmf.delivery.WTDeliveryException
For I2W/W2I project only. This is an alternative but more convenient method of sendItemImmediate().

Supported API: true

Specified by:
iasPullContent in interface ShippingService
Parameters:
iasUrl - The site address of the IAS servlet
transportType - By default this is "GZIPHttpPipe" which can be overwrite by system configuration
localAction - To specify how to handle the input stream downloaded
queryStr - Query information to locate the source stream at remote site
pullMethod - The method how to retrieve the stream. By default the Signatures are HttpServletRequest and HttpServletResponse, otherwise the signature types and values must be included in the "queryStr"
outboxName - Name of the OutBox. Should be unique for all IAS delivery requests
inboxName - Name of the InBox. Should be unique for all IAS delivery requests
Returns:
TrackingID
Throws:
wt.wrmf.delivery.WTDeliveryException