Interface ShippingService

All Known Implementing Classes:
StandardShippingService

public interface ShippingService


Supported API: true

Extendable: false
  • Method Details

    • sendItem

      TrackingID sendItem(ShippingItem obj, ShippingLabel toLabel) throws 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
      Parameters:
      obj -
      toLabel -
      Returns:
      TrackingID
      Throws:
      WTDeliveryException
    • sendItem

      TrackingID sendItem(ShippingItem obj, ShippingLabel toLabel, ShippingLabel receiptLabel) throws 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
      Parameters:
      obj -
      toLabel -
      receiptLabel -
      Returns:
      TrackingID
      Throws:
      WTDeliveryException
    • sendImmediateItem

      InputStream sendImmediateItem(ShippingItem obj, SiteAddress to, TransportType transportType) throws 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
      Parameters:
      obj -
      to -
      transportType -
      Returns:
      InputStream
      Throws:
      WTDeliveryException
    • sendImmediateItem

      InputStream sendImmediateItem(ShippingItem obj, SiteAddress to, TransportType transportType, int returnType) throws 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
      Parameters:
      obj -
      to -
      transportType -
      returnType -
      Returns:
      InputStream
      Throws:
      WTDeliveryException
    • iasPullContentImmediate

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

      Supported API: true
      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:
      WTDeliveryException
    • iasPullContent

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

      Supported API: true
      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:
      WTDeliveryException