|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.syndication.client.local.ICESampleClient
Reference implementation of the ICEClient interface. This implementation allows the user to create an instance of this client and initialize it with the URI of the Syndication Server, the URI of the subscriber listening for PUSH deliveries, and information on the ice-sender that will represent the client. After initialization, the client code can either call methods to create ice-requests as readers or actually have this client library make a remote call to the Syndication server to perform a series of ice-requests including ice-get-catalog, ice-offer, and ice-get-package, and get the response back as an ice-payload.
Constructor Summary |
ICESampleClient()
Default empty constructor does some simple initialization. |
Method Summary |
Type | Method |
---|---|
java.io.Reader |
createGetCatalogPayload(java.lang.String szPid,
java.lang.String szReqId)
Creates the get-catalog request payload as a reader |
java.io.Reader |
createGetEventsPayload(java.lang.String szPayloadId,
java.lang.String szRequestId,
java.lang.String szFormat,
ISODatetime isodtStart,
ISODatetime isodtStop,
java.lang.String szSubsId)
Creates the get-events request payload as a reader |
java.io.Reader |
createGetPackagePayload(java.lang.String szPayloadId,
java.lang.String szRequestId,
java.lang.String szSubsId,
java.lang.String szCurrState)
Creates the get-package request payload as a reader |
java.io.Reader |
createGetStatusPayload(java.lang.String szPayloadId,
java.lang.String szRequestId,
java.lang.String szSubsId)
Creates the get-status request payload as a reader |
java.io.Reader |
createSubscribePayload(java.lang.String szPayloadId,
java.lang.String szRequestId,
Ice_offer offer)
Creates the subscribe (ice-offer) request payload as a reader |
java.io.Reader |
createUnsubscribePayload(java.lang.String szPid,
java.lang.String szReqId,
java.lang.String szSubscriptionId)
Creates the cancel-subscription request payload as a reader |
Ice_payload |
getCatalog(java.lang.String payload_id,
java.lang.String request_id)
Asks for the catalog from the specified server. |
Ice_payload |
getEvents(java.lang.String payload_id,
java.lang.String request_id,
java.lang.String format,
ISODatetime start,
ISODatetime stop,
java.lang.String subscription_id)
get events for a specified subscription within certain timeframe |
java.lang.String |
getId()
Returns the sender id that every ICE message will be branded with |
int |
getInterval()
|
java.lang.String |
getName()
Returns the sender name that every ICE message will be branded with |
Ice_payload |
getPackage(java.lang.String payload_id,
java.lang.String request_id,
java.lang.String subscription_id,
java.lang.String current_state)
PULL package ( content ) for an existing subscription |
java.lang.String |
getServerURI()
Gets the URI in String format of the Syndication Server |
java.lang.String |
getSSOPassword()
Returns the sender password that every ICE message will be branded with |
java.lang.String |
getSSOUsername()
Return SSO user identity |
Ice_payload |
getStatus(java.lang.String payload_id,
java.lang.String request_id,
java.lang.String subscription_id)
get status for a specified subscription |
java.lang.String |
getUri()
Return the subscriber location for receiving a PUSHed package |
void |
init(HTTPClient.URI serverUri,
java.lang.String szSubscriberUri,
java.lang.String szSenderId,
java.lang.String szSenderName,
java.lang.String szSSOUser,
java.lang.String szSSOPawd,
int iSenderRole,
int iDeliveryIntv)
|
OSSResponse |
nonSSOSendRequest(HTTPClient.URI destURI,
OSSRequest req)
This method is used in non-sso case for the syndication entity ( Server: PUSH or Broadcasting; Client: Send request ) |
OSSResponse |
sendRequest(HTTPClient.URI destURI,
OSSRequest req)
This method is used for the syndication entity ( Server: PUSH or Broadcasting; Client: Send request ) if m_szSenderPassword is null, we will try non-sso sendRequest otherwise, we will try sso SendRequest |
void |
setId(java.lang.String id)
|
void |
setInterval(int iIntv)
Set the delivery interval |
void |
setName(java.lang.String name)
|
void |
setSenderRole(int role)
|
void |
setServerURI(HTTPClient.URI serverUri)
|
void |
setSSOPassword(java.lang.String p_szPassword)
|
void |
setSSOUsername(java.lang.String p_szUser)
|
Ice_payload |
subscribe(java.lang.String payload_id,
java.lang.String request_id,
Ice_offer ice_offer)
Subscribe to the offer from the catalog provided by the server and establish the business term and delivery policies |
Ice_payload |
unsubscribe(java.lang.String payload_id,
java.lang.String request_id,
java.lang.String szSubscriptionId)
Cancel subscription |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ICESampleClient()
Method Detail |
public void init(HTTPClient.URI serverUri, java.lang.String szSubscriberUri, java.lang.String szSenderId, java.lang.String szSenderName, java.lang.String szSSOUser, java.lang.String szSSOPawd, int iSenderRole, int iDeliveryIntv) throws OSSException
szServerUri
- The url of the ICE syndication server this
subscriber instance is going to commucate withszSenderId
- The required sender unique identifier (UUID)
of the current ICE-request sender which is using the current
subscriber instanceszSenderName
- The sender nameszSSOUser
- The Oracle SSO User nameszSSOPawd
- The Oracle SSO User passwordiSenderRole
- The role describes the role in this ICE conversationiDeliveryIntv
- The parameter describes the default PUSH delivery
intervalpublic java.lang.String getUri()
public java.io.Reader createGetCatalogPayload(java.lang.String szPid, java.lang.String szReqId)
public java.io.Reader createSubscribePayload(java.lang.String szPayloadId, java.lang.String szRequestId, Ice_offer offer)
public java.io.Reader createUnsubscribePayload(java.lang.String szPid, java.lang.String szReqId, java.lang.String szSubscriptionId)
public OSSResponse sendRequest(HTTPClient.URI destURI, OSSRequest req) throws OSSException
destURI
- , the target where req to be sentreq
- , the request to be sentpublic OSSResponse nonSSOSendRequest(HTTPClient.URI destURI, OSSRequest req) throws OSSException
public java.io.Reader createGetPackagePayload(java.lang.String szPayloadId, java.lang.String szRequestId, java.lang.String szSubsId, java.lang.String szCurrState)
public java.io.Reader createGetStatusPayload(java.lang.String szPayloadId, java.lang.String szRequestId, java.lang.String szSubsId)
public java.io.Reader createGetEventsPayload(java.lang.String szPayloadId, java.lang.String szRequestId, java.lang.String szFormat, ISODatetime isodtStart, ISODatetime isodtStop, java.lang.String szSubsId)
public Ice_payload getCatalog(java.lang.String payload_id, java.lang.String request_id) throws OSSException
payload_id
- The sender specifies the unique id for the "get-catalog"
request payloadrequest_id
- The sender spefified the unique id for the individual
request inside the GETCATALOG request payload ( mutiple
request supported in ICE1.1)public Ice_payload subscribe(java.lang.String payload_id, java.lang.String request_id, Ice_offer ice_offer) throws OSSException
payload_id
- The sender specifies the unique id for the "subscribe"
request payloadrequest_id
- The sender spefified the unique id for the individual
request inside the "subscribe" request payload ( mutiple
request supported in ICE1.1)ice_offer
- The offer list which the subscriber is about to
subscribe to.public Ice_payload unsubscribe(java.lang.String payload_id, java.lang.String request_id, java.lang.String szSubscriptionId) throws OSSException
payload_id
- The payload id generated by the local client system.
Must be unique across all the payloads sent out by this
client application.request_id
- The request id to identify the current "cancel-
subscription" request which is generated by the local
client system and should be unique within the same ice
payload across all the requests.szSubscriptionId
- The unique id known to both the client ( as the
subscriber ) and the syndication server, which is
assigned to the client by the server during the
subscribing timepublic Ice_payload getPackage(java.lang.String payload_id, java.lang.String request_id, java.lang.String subscription_id, java.lang.String current_state) throws OSSException
payload_id
- The payload id generated by the local client system.
Must be unique across all the payloads sent out by this
client application.request_id
- The request id to identify the current "get-package"
request which is generated by the local client system
and should be unique within the same ice payload across
all the requests.szSubscriptionId
- The unique id known to both the client ( as the
subscriber ) and the syndication server, which is
assigned to the client by the server during the
subscribing time.public Ice_payload getStatus(java.lang.String payload_id, java.lang.String request_id, java.lang.String subscription_id) throws OSSException
payload_id
- The payload id generated by the local client system.
Must be unique across all the payloads sent out by this
client application.request_id
- The request id to identify the current "get-status"
request which is generated by the local client system
and should be unique within the same ice payload across
all the requests.szSubscriptionId
- The unique id known to both the client ( as the
subscriber ) and the syndication server, which is
assigned to the client by the server during the
subscribing time.public Ice_payload getEvents(java.lang.String payload_id, java.lang.String request_id, java.lang.String format, ISODatetime start, ISODatetime stop, java.lang.String subscription_id) throws OSSException
payload_id
- The payload id generated by the local client system.
Must be unique across all the payloads sent out by this
client application.request_id
- The request id to identify the current "get-status"
request which is generated by the local client system
and should be unique within the same ice payload across
all the requests.format
- should be "ice" in current implementationstart
- used to filter returned eventsstop
- used to filter returned eventsszSubscriptionId
- The unique
id known to both the client ( as the
subscriber ) and the syndication server, which is
assigned to the client by the server during the
subscribing time.public void setServerURI(HTTPClient.URI serverUri)
serverUri
- The url of the ICE Syndication Server this client
instance is going to talk topublic java.lang.String getServerURI()
public void setId(java.lang.String id)
id
- The GUID for the sender currently bind to the
sender instancepublic java.lang.String getId()
public void setSSOUsername(java.lang.String p_szUser)
p_szUsername
- for SSO login processpublic java.lang.String getSSOUsername()
public void setSSOPassword(java.lang.String p_szPassword)
password
- for the senderpublic java.lang.String getSSOPassword()
public void setName(java.lang.String name)
name
- The name for the current sender
who is bound to the current sender instancepublic java.lang.String getName()
public void setSenderRole(int role) throws OSSException
role
- describes the role in this ICE conversation for
the current sender.
It is restricted to be "Ice_sender.ROLE_SUBSCRIBER or
Ice_sender.ROLE_SYNDICATOR"public void setInterval(int iIntv)
public int getInterval()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |