oracle.syndication.client.local
Interface ICEClientOfferManager

All Known Implementing Classes:
ICESampleOfferManager

public abstract interface ICEClientOfferManager

Suggested interface to the subscriber ( or client to the OSS ) to implement their own offer/subscription manager. This interface is used for clients to keep track of the catalogs / offers received from the Syndication Server and all the established subscriptions.

Since:
9.0.0.0.0 Beta

Method Summary
TypeMethod
 Ice_contact getCatalogContact()
          Shortcut to get the contact information for the current catalog response
 java.lang.String getCurrentState(java.lang.String szSubscriptionId)
          Return the current state for the given subscription in order to retrieve content from the server
 int getNumberOfOfferGroups()
          Due to the fixed sturcture of ICE payload, any catalog is required to contain ICE-OFFER-GROUP as the starting element.
 Ice_offer getOffer(java.lang.String szOfferId)
          Get the offer in the current catalog stored at the client side by its key : group description
 java.util.Iterator getOfferGroups()
          Get all the offer-groups in the current catalog stored at the client side.
 java.lang.String getRawServerResponse(java.lang.String szResponseType)
          Get the raw response that's been stored.
 java.lang.String getServerRequest(java.lang.String szRequestType)
          String version of the subscribe request
 Ice_payload getServerResponse(java.lang.String szResponseType)
          Get the Ice_payload that's been stored.
 java.lang.String getSubscription(java.lang.String szSubscriptionId)
          Returns a String representation of the subscription given the subscription Id.
 java.util.Iterator getSubscriptionIds()
          Returns the list of subscription Ids.
 void removeSubscription(java.lang.String szSubscriptionId)
          Returns a String representation of the subscription given the subscription Id.
 void setServerRequest(java.lang.String szRequestType, java.io.Reader rdRequest)
          Set the client's subscription Request to remember for purposes of previewing the request.
 void setServerResponse(java.lang.String szResponseType, Ice_payload catalogPayload)
          Store the offer-groups/offers
 void updateCurrentState(java.lang.String szSubscriptionId, java.lang.String szNewState)
          Each time after a PULL content, the client needs to update its local subscriptiontable for the "current state"
 

Method Detail

setServerResponse

public void setServerResponse(java.lang.String szResponseType,
                              Ice_payload catalogPayload)
                       throws OSSException
Store the offer-groups/offers
Parameters:
szResponseType - Type of the response we're remembering
szRawResponse - String representation of the response
payload - ICE Payload representation of the response

getRawServerResponse

public java.lang.String getRawServerResponse(java.lang.String szResponseType)
Get the raw response that's been stored.
Parameters:
szResponseType - Type of the response remembered.

getServerResponse

public Ice_payload getServerResponse(java.lang.String szResponseType)
Get the Ice_payload that's been stored.
Parameters:
szResponseType - Type of the response remembered.

getCatalogContact

public Ice_contact getCatalogContact()
                              throws OSSException
Shortcut to get the contact information for the current catalog response

getNumberOfOfferGroups

public int getNumberOfOfferGroups()
                           throws OSSException
Due to the fixed sturcture of ICE payload, any catalog is required to contain ICE-OFFER-GROUP as the starting element. No ICE-OFFER can be included without a ICE-OFFER-GROUP as its parent node

getOfferGroups

public java.util.Iterator getOfferGroups()
                                  throws OSSException
Get all the offer-groups in the current catalog stored at the client side.

getOffer

public Ice_offer getOffer(java.lang.String szOfferId)
                   throws OSSException
Get the offer in the current catalog stored at the client side by its key : group description

setServerRequest

public void setServerRequest(java.lang.String szRequestType,
                             java.io.Reader rdRequest)
                      throws OSSException
Set the client's subscription Request to remember for purposes of previewing the request.
Parameters:
szRequestType - Type of request.
rdRequest - The reader carrying the request.

getServerRequest

public java.lang.String getServerRequest(java.lang.String szRequestType)
String version of the subscribe request

getSubscriptionIds

public java.util.Iterator getSubscriptionIds()
Returns the list of subscription Ids.

removeSubscription

public void removeSubscription(java.lang.String szSubscriptionId)
Returns a String representation of the subscription given the subscription Id.

getSubscription

public java.lang.String getSubscription(java.lang.String szSubscriptionId)
Returns a String representation of the subscription given the subscription Id.

getCurrentState

public java.lang.String getCurrentState(java.lang.String szSubscriptionId)
Return the current state for the given subscription in order to retrieve content from the server

updateCurrentState

public void updateCurrentState(java.lang.String szSubscriptionId,
                               java.lang.String szNewState)
Each time after a PULL content, the client needs to update its local subscriptiontable for the "current state"