com.candle.roma.kxc
Class RomaSubscription

java.lang.Object
  |
  +--com.candle.roma.kxc.RomaSubscription

public class RomaSubscription
extends java.lang.Object

This class encapsulates subscription messages put by a Roma client. Almost all of the methods provided are provided the same as the RomaClientRequest class. The class also provides the setOnRequest and setNewPubsOnly methods. setOnRequest means that the subscriber won't get publications until it requests them using RomaClient.RequestUpdates(). setNewPubsOnly means that the subscriber will only receive newly issued publications and not retained publications.


Constructor Summary
RomaSubscription(java.lang.String svcName, RomaSubject subject)
          Constructs a subscription with default options and with the name of a Roma business service and subject to subscribe to.
 
Method Summary
 RomaILSData getILSData()
          Get incoming ILS data
 void setApiProfileName(java.lang.String profile)
          Associates an API profile with the operation.
 void setCloseTheme(boolean b)
          Specify whether the theme should be closed automatically when the operation completes.
 void setCOA(boolean flag)
          set or clear confirmation of arrival flag
 void setCOD(boolean flag)
          set or clear confirmation of delivery flag
 void setDatagram(boolean b)
          Sets the datagram flag.
 void setErrorProfileName(java.lang.String profile)
          Associates an error profile with the operation.
 void setExpiry(int expiry)
          Set a new message expiry time.
 void setFeedback(int feedback)
          Sets a new message feedback code.
 void setILSData(RomaILSData ilsData)
          Set outgoing ILS data
 void setMsgName(java.lang.String messageName)
          Set the name of this message
 void setNewPubsOnly(boolean b)
          Sets the New Publications Only flag, which means that the subscriber won't receive publications that were published and retained before receipt of the subscription.
 void setNewTheme(boolean b)
          Specify whether a new theme should be allocated.
 void setNoEms(boolean select)
          Enables or disables the option to send the message to an exception message service if the subscribe or unsubscribe operation fails.
 void setOnRequest(boolean b)
          Sets the On Request option, whereby the subscriber has to request updates.
 void setPersistence(int persistence)
          Set a new value for the message perisitence.
 void setPriority(int priority)
          Set the message priority.
 void setRetainTheme(boolean b)
          Specify whether the theme should be retained for future operations.
 void setSecurityDef(RomaSecurityDef secDef)
          Set security definition
 void setServiceName(java.lang.String svcName)
          Sets the name of the Roma Business Service that a publish operation will send this subscription to.
 void setSubject(RomaSubject subject)
          Set a subject of the subscription
 void setSuppressErrorProfile(boolean b)
          Specify if error profiling is to be suppressed
 void setSyncpointDef(RomaSyncpointDef sync)
          Specify sync point definitiion
 void setTermSupported(boolean b)
          Specify if termination is supported
 void setTheme(RomaTheme theme)
          Update the message theme.
 void setUseTheme(boolean b)
          Specify whether an existing theme should be used.
 RomaTheme theme()
          Return the message theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RomaSubscription

public RomaSubscription(java.lang.String svcName,
                        RomaSubject subject)
Constructs a subscription with default options and with the name of a Roma business service and subject to subscribe to.
Parameters:
svcName - Name of a Roma Business Service.
subject - Subject of the publication.
Method Detail

setServiceName

public void setServiceName(java.lang.String svcName)
Sets the name of the Roma Business Service that a publish operation will send this subscription to.
Parameters:
svcName - Roma Business Service name.

setApiProfileName

public void setApiProfileName(java.lang.String profile)
Associates an API profile with the operation.
Parameters:
profile - the name of the API profile.

setErrorProfileName

public void setErrorProfileName(java.lang.String profile)
Associates an error profile with the operation.
Parameters:
profile - the name of the error profile.

setSuppressErrorProfile

public void setSuppressErrorProfile(boolean b)
Specify if error profiling is to be suppressed
Parameters:
b - true to suppress error profiling

setNoEms

public void setNoEms(boolean select)
Enables or disables the option to send the message to an exception message service if the subscribe or unsubscribe operation fails.
Parameters:
select - one of :-
  • true - do not perform a send to an exception message service if the operation fails.
  • false - allow a message to be sent to an exception message service if the operation fails.

setTermSupported

public void setTermSupported(boolean b)
Specify if termination is supported
Parameters:
b - true to indicate termination is supported.

setNewTheme

public void setNewTheme(boolean b)
Specify whether a new theme should be allocated.

Parameters:
b - if true then a new theme is allocated.

setRetainTheme

public void setRetainTheme(boolean b)
Specify whether the theme should be retained for future operations.

Parameters:
b - if true then the theme is retained.

setCloseTheme

public void setCloseTheme(boolean b)
Specify whether the theme should be closed automatically when the operation completes.

Parameters:
b - if true then the theme will be closed.

setUseTheme

public void setUseTheme(boolean b)
Specify whether an existing theme should be used.

Parameters:
b - if true then the existing theme is used.

setCOD

public void setCOD(boolean flag)
set or clear confirmation of delivery flag

setCOA

public void setCOA(boolean flag)
set or clear confirmation of arrival flag

setDatagram

public void setDatagram(boolean b)
Sets the datagram flag. Controls whether or not confirmation messages are to be returned.

If an API profile is to be used (selected by invoking the useApiProfile() method and verifiable by querying the isApiProfileUsed() method) then this setting will be overridden either by the profile or, if not available, the default for this option.

Parameters:
b - one of :-
  • true - send DATAGRAM (and don't return confirmations)
  • false - send REQUEST (and return confirmations)

setPriority

public void setPriority(int priority)
Set the message priority.
Parameters:
priority - this can be one of the following :-
  • PRIORITY_DEFAULT - use the default priority from the transport.
  • PRIORITY_PROFILE - use the priority as specified in the associated Put API profile. If no such profile or attribute, use PRIORITY_DEFAULT.
  • a specific integer meaningful to the underlying transport e.g. 0..9 for MQSeries and BEAMQ, 0..7 for MSMQ

setPersistence

public void setPersistence(int persistence)
Set a new value for the message perisitence.
Parameters:
persistence - this can be one of the following :-
  • PERSISTENCE_YES
  • PERSISTENCE_NO
  • PERSISTENCE_PROFILE - use the persistence value as specified in the associated Put API profile. If no such profile or attribute, use PERSISTENCE_NO.

setFeedback

public void setFeedback(int feedback)
Sets a new message feedback code.
Parameters:
feedback - new message feedback value.

setExpiry

public void setExpiry(int expiry)
Set a new message expiry time.
Parameters:
expiry - the new expiry time value in seconds or EXPIRY_NEVER or EXPIRY_PROFILE. If EXPIRY_PROFILE is specified then the expiry value is retrieved from the associated Put API profile. If the profile is not available or else has no expiry attribute set, the EXPIRY_NEVER constant is used.

setTheme

public void setTheme(RomaTheme theme)
Update the message theme.
Parameters:
theme - RomaTheme object.

theme

public RomaTheme theme()
Return the message theme. Theme can be set internally when the message is being sent or received or else explicitly by the user.

setMsgName

public void setMsgName(java.lang.String messageName)
Set the name of this message
Parameters:
messageName - name to be used

setSecurityDef

public void setSecurityDef(RomaSecurityDef secDef)
Set security definition
Parameters:
secDef - security definition to be sent with message

setSyncpointDef

public void setSyncpointDef(RomaSyncpointDef sync)
Specify sync point definitiion

Parameters:
sync - definition to be used.

setILSData

public void setILSData(RomaILSData ilsData)
Set outgoing ILS data
Parameters:
ilsData - The ILS data to be sent with message

getILSData

public RomaILSData getILSData()
Get incoming ILS data

setSubject

public void setSubject(RomaSubject subject)
Set a subject of the subscription
Parameters:
subject - subject of the subscription

setNewPubsOnly

public void setNewPubsOnly(boolean b)
Sets the New Publications Only flag, which means that the subscriber won't receive publications that were published and retained before receipt of the subscription.
Parameters:
b - one of :-
  • true - the subscriber doesn't want retained publications
  • false - the subscriber does want retained publications

setOnRequest

public void setOnRequest(boolean b)
Sets the On Request option, whereby the subscriber has to request updates.
Parameters:
b - one of :-
  • true - the subscriber wants to request publications
  • false - the wants to receive publications as soon as they are available
See Also:
RomaClient.requestUpdates(RomaSubscription)