|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.candle.roma.kxc.RomaContext | +--com.candle.roma.kxc.RomaClient
This class represents the application's client-side use of Roma.
A single application is allowed to instantiate multiple objects of the RomaClient class.
A RomaClient can issue requests to a Business Service and can get responses.
A client can also commit and rollback transactions.
It is intended that the RomaClient class be extended by application programmers to differentiate between different kinds of responses. To do this the application programmer must provide a new implementation of the createResponse() method that determines what kind of RomaClientResponse has been received by looking at the incoming message attributes such as the message format or message identifier. The application programmer may then create an appropriate type of RomaClientResponse that has application-specific instructions for the unmarshalling of the message data.
RomaClientResponse
Constructor Summary | |
RomaClient()
Constructs a new RomaClient object but does not attach to the Roma network. |
|
RomaClient(java.lang.String name)
Constructs a named Client and attaches to the Roma network using default application options and with no security definition. |
|
RomaClient(java.lang.String name,
int opts)
Constructs a named Client, with the specified application options and attaches to the Roma network. |
|
RomaClient(java.lang.String name,
int opts,
RomaSecurityDef sec)
Constructs a named Client, with the specified application options and security definition, and attaches to the Roma network. |
|
RomaClient(java.lang.String name,
int opts,
RomaSecurityDef sec,
java.lang.String modelQName)
Constructs a named Client, with the specified application options security definition, and model queue name and then attaches to the Roma network. |
|
RomaClient(java.lang.String name,
int opts,
RomaSecurityDef sec,
java.lang.String modelQName,
RomaILSData ilsData)
Constructs a named Client, with the specified application options, security definition, model queue name and data to hand off to the transport data structure ILS, and attaches to the Roma network. |
|
RomaClient(java.lang.String name,
int opts,
RomaSecurityDef sec,
java.lang.String modelQName,
RomaILSData ilsData,
RomaDirectoryAccess dirAccess)
Constructs a named Client, with the specified application options, security definition, model queue name, data to hand off to the transport data structure ILS and LDAP authentication information, and attaches to the Roma network. |
Method Summary | |
RomaTheme |
buildTheme(RomaTheme theme,
RomaThemeInfo info,
int options,
boolean close)
Creates a new theme from the source theme and the specified theme information. |
void |
connect(java.lang.String name)
Attaches a named Client to the Roma network. |
void |
connect(java.lang.String name,
int opts)
Attach to the Roma network. |
void |
connect(java.lang.String name,
int opts,
RomaSecurityDef sec)
Attach to the Roma network. |
void |
connect(java.lang.String name,
int opts,
RomaSecurityDef sec,
java.lang.String modelQName)
Attach to the Roma network. |
void |
connect(java.lang.String name,
int opts,
RomaSecurityDef sec,
java.lang.String modelQName,
RomaILSData ilsData)
Attach to the Roma network. |
void |
connect(java.lang.String name,
int options,
RomaSecurityDef secDef,
java.lang.String modelQName,
RomaILSData ilsData,
RomaDirectoryAccess dirAccess)
Attach to the Roma network. |
protected RomaClientResponse |
createResponse(RomaClientResponse resp)
Invoked in get() methods once the response has been retrieved from the Roma network. |
void |
deletePublication(RomaPublication pub)
Deletes a retained publication. |
RomaClientResponse |
get()
Gets the response to an earlier Client using default options. |
RomaClientResponse |
get(RomaGetOptions opt)
Gets the response to an earlier Client request using supplied options. |
RomaClientResponse |
get(RomaGetOptions opt,
byte[] msgBuf,
RomaInteger msgBufSize,
byte[] tagBuf,
RomaInteger tagBufSize)
Gets the response to an earlier Client request request using supplied options. |
RomaILSData |
getILSData()
Gets any data an inline service has made available to the application on initialization. |
RomaMessageInfo |
interpretMessage(RomaClientResponse msg,
int options)
Returns detailed information on the specified message. |
void |
publish(RomaClientRequest req,
RomaSubject subject)
Analagous to a put, but the request is treated as a publication on the specified subject. |
void |
publish(RomaPublication pub)
Analagous to a put, but the publication is "broadcast" to any application that has subscribed to receive messages on the subject contained within the RomaPublication object. |
void |
put(RomaClientRequest req)
Puts a request to a Business Service. |
RomaThemeInfo |
queryTheme(RomaTheme theme)
Returns information on the specified theme. |
void |
requestUpdates(RomaSubscription subscr)
Request any new publications since the last request update request. |
void |
subscribe(RomaClientRequest req,
RomaSubject subject)
Subscribe to the specified subject. |
void |
subscribe(RomaSubscription subscr)
Subscribe to receive publications sent with the subject defined within the RomaSubscription object. |
void |
unsubscribe(RomaClientRequest req,
RomaSubject subject)
Unsubscribe to the specified subject. |
void |
unsubscribe(RomaSubscription subscr)
Unsubscribe to receive publications sent with the subject defined within the RomaSubscription object. |
void |
unsubscribeAll(RomaSubscription subscr)
Unsubscribes for all subjects. |
Methods inherited from class com.candle.roma.kxc.RomaContext |
closeTheme, commitLocal, copyTheme, deleteStorageQueue, disconnect, insertWorkflow, isConnected, mergeEteInfo, putException, putException, replaceWorkflow, reportError, reportError, rollbackLocal, sendAlert, setBusinessFlow, writeLog, writeSysLog |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RomaClient()
Call method connect() to attach to the Roma network.
public RomaClient(java.lang.String name) throws RomaError
name
- name of the new Client.RomaError
- is thrown on operation failure.public RomaClient(java.lang.String name, int opts) throws RomaError
name
- name of the new Client.opts
- application optionsRomaError
- is thrown on operation failure.public RomaClient(java.lang.String name, int opts, RomaSecurityDef sec) throws RomaError
name
- name of the new Client.opts
- application optionssec
- security optionsRomaError
- is thrown on operation failure.public RomaClient(java.lang.String name, int opts, RomaSecurityDef sec, java.lang.String modelQName) throws RomaError
name
- name of the new Client.opts
- application optionssec
- security optionsmodelQName
- model queue nameRomaError
- is thrown on operation failure.public RomaClient(java.lang.String name, int opts, RomaSecurityDef sec, java.lang.String modelQName, RomaILSData ilsData) throws RomaError
name
- name of the new Client.opts
- application optionssec
- security optionsmodelQName
- model queue nameilsData
- data to hand off to the ILSRomaError
- is thrown on operation failure.public RomaClient(java.lang.String name, int opts, RomaSecurityDef sec, java.lang.String modelQName, RomaILSData ilsData, RomaDirectoryAccess dirAccess) throws RomaError
name
- name of the new Client.opts
- application optionssec
- security optionsmodelQName
- model queue nameilsData
- data to hand off to the ILSdirAccess
- LDAP authentication informationRomaError
- is thrown on operation failure.Method Detail |
public void connect(java.lang.String name) throws RomaError
name
- name of the Client.nameRomaError
- is thrown on operation failurepublic void connect(java.lang.String name, int opts) throws RomaError
name
- name of the Clientopts
- application optionsRomaError
- is thrown on operation failurepublic void connect(java.lang.String name, int opts, RomaSecurityDef sec) throws RomaError
name
- name of the Clientopts
- application optionssec
- security definitionRomaError
- is thrown on operation failurepublic void connect(java.lang.String name, int opts, RomaSecurityDef sec, java.lang.String modelQName) throws RomaError
name
- name of the Clientopts
- application optionssec
- security definitionmodelQName
- model queue nameRomaError
- is thrown on operation failurepublic void connect(java.lang.String name, int opts, RomaSecurityDef sec, java.lang.String modelQName, RomaILSData ilsData) throws RomaError
name
- name of the Clientopts
- application optionssec
- security definitionmodelQName
- model queue nameilsData
- data to hand off to the ILSRomaError
- is thrown on operation failurepublic void connect(java.lang.String name, int options, RomaSecurityDef secDef, java.lang.String modelQName, RomaILSData ilsData, RomaDirectoryAccess dirAccess) throws RomaError
name
- name of the Clientoptions
- application optionssecDef
- security definitionmodelQName
- model queue nameilsData
- data to hand off to the ILSdirAccess
- LDAP authentication informationRomaError
- is thrown on operation failurepublic void put(RomaClientRequest req) throws RomaError
This method calls the ClientRequest class' marshalRequest() method immediately before issuing the request. If the put succeeds the RomaClientRequest instance is updated with the generated theme and/or the message id and correlation id if the user did not specified them on the request.
req
- the RomaClientRequest to be put. This provides the
options and the data for the put operation.RomaError
- is thrown on operation failurepublic RomaClientResponse get() throws RomaError
If the wait interval has expired a null RomaClientResponse is returned.
RomaError
- is thrown on operation failurepublic RomaClientResponse get(RomaGetOptions opt) throws RomaError
opt
- chooses the responseRomaError
- is thrown on operation failurepublic RomaClientResponse get(RomaGetOptions opt, byte[] msgBuf, RomaInteger msgBufSize, byte[] tagBuf, RomaInteger tagBufSize) throws RomaError
opt
- chooses the responsemsgBuf
- buffer to receive messagemsgBufSize
- size of message buffer.tagBuf
- buffer to receive tag datatagBufSize
- size of buffer to receive tag dataRomaError
- is thrown on operation failurepublic void publish(RomaClientRequest req, RomaSubject subject) throws RomaError
req
- defined service name and the data to be published.subject
- specifies the subject for this publication.RomaError
- is thrown if a Roma operation fails or
a marshalling error occurspublic void subscribe(RomaClientRequest req, RomaSubject subject) throws RomaError
req
- defines the service name.subject
- the subject to be subscribed to (can include wildcards)RomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void unsubscribe(RomaClientRequest req, RomaSubject subject) throws RomaError
req
- defines the service name.subject
- the subject to be unsubscribed to (can include wildcards)RomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void publish(RomaPublication pub) throws RomaError
pub
- defined service name and the data to be published.RomaError
- is thrown if a Roma operation fails or
a marshalling error occurspublic void subscribe(RomaSubscription subscr) throws RomaError
subscr
- defines the service name and subject.RomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void unsubscribe(RomaSubscription subscr) throws RomaError
subscr
- defines the service name and subject.RomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void requestUpdates(RomaSubscription subscr) throws RomaError
subscr
- defines the service name and subjectRomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void deletePublication(RomaPublication pub) throws RomaError
pub
- defines the service name and subjectRomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public void unsubscribeAll(RomaSubscription subscr) throws RomaError
subscr
- defines the service name - the subject is ignoredRomaError
- is thrown if a Roma operation fails or
a marshalling error occurs.public RomaILSData getILSData() throws RomaError
RomaError
- is thrown on operation failurepublic RomaThemeInfo queryTheme(RomaTheme theme) throws RomaError
theme
- Source themeRomaError
- is thrown if the operation failspublic RomaTheme buildTheme(RomaTheme theme, RomaThemeInfo info, int options, boolean close) throws RomaError
theme
- Source themeinfo
- Theme informationoptions
- Options indicating what parts of the theme information to
use for the theme build. It is THEMEINFO_ALL or a combination of
Roma.THEMEINFO_THEMEID
- use theme IDRoma.THEMEINFO_RETRYCOUNT
- use retry countRoma.THEMEINFO_WORKFLOW
- use workflow informationRoma.THEMEINFO_ETEINFO
- use ETE informationRoma.THEMEINFO_TRAILERS
- use persistent trailersRoma.THEMEINFO_CONFIRMFLAGS
- use confirmation flagsclose
- If true, closes the source themeRomaError
- is thrown if the operation failspublic RomaMessageInfo interpretMessage(RomaClientResponse msg, int options) throws RomaError
msg
- Source messageoptions
- Feature options, should be zero or one of
Roma.INTMSG_THEME
- extract the message theme. The application is responsible for the theme closing.RomaError
- is thrown if the operation failsprotected RomaClientResponse createResponse(RomaClientResponse resp)
It is intended that this method is overridden in subclasses to differentiate between different types of response.
Users can construct subclasses of RomaClientResponse classes that deal with the application-specific response data as appropriate.
The overriddden createResponse() method can construct the appropriate type of RomaClientResponse using the RomaClientResponse instance data.
resp
- RomaClientResponse containing raw response data.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |