Package com.ibm.fhir.model.resource
Class Subscription
- java.lang.Object
-
- com.ibm.fhir.model.visitor.AbstractVisitable
-
- com.ibm.fhir.model.resource.Resource
-
- com.ibm.fhir.model.resource.DomainResource
-
- com.ibm.fhir.model.resource.Subscription
-
- All Implemented Interfaces:
Visitable
@Generated("com.ibm.fhir.tools.CodeGenerator") public class Subscription extends DomainResource
The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.Maturity level: FMM3 (Trial Use)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Subscription.Builder
static class
Subscription.Channel
Details where to send notifications when resources are received that meet the criteria.
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.resource.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class com.ibm.fhir.model.resource.Resource
id, implicitRules, language, meta
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(String elementName, int elementIndex, Visitor visitor)
Accept a Visitor and invoke the appropriate visit methods.static Subscription.Builder
builder()
boolean
equals(Object obj)
Subscription.Channel
getChannel()
Details where to send notifications when resources are received that meet the criteria.List<ContactPoint>
getContact()
Contact details for a human to contact about the subscription.String
getCriteria()
The rules that the server should use to determine when to generate notifications for this subscription.Instant
getEnd()
The time for the server to turn the subscription off.String
getError()
A record of the last error that occurred when the server processed a notification.String
getReason()
A description of why this subscription is defined.SubscriptionStatus
getStatus()
The status of the subscription, which marks the server state for managing the subscription.boolean
hasChildren()
int
hashCode()
Subscription.Builder
toBuilder()
Create a new Builder from the contents of this Resource-
Methods inherited from class com.ibm.fhir.model.resource.DomainResource
getContained, getExtension, getModifierExtension, getText
-
Methods inherited from class com.ibm.fhir.model.resource.Resource
as, getId, getImplicitRules, getLanguage, getMeta, is
-
-
-
-
Method Detail
-
getStatus
public SubscriptionStatus getStatus()
The status of the subscription, which marks the server state for managing the subscription.- Returns:
- An immutable object of type
SubscriptionStatus
that is non-null.
-
getContact
public List<ContactPoint> getContact()
Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.- Returns:
- An unmodifiable list containing immutable objects of type
ContactPoint
that may be empty.
-
getEnd
public Instant getEnd()
The time for the server to turn the subscription off.- Returns:
- An immutable object of type
Instant
that may be null.
-
getReason
public String getReason()
A description of why this subscription is defined.- Returns:
- An immutable object of type
String
that is non-null.
-
getCriteria
public String getCriteria()
The rules that the server should use to determine when to generate notifications for this subscription.- Returns:
- An immutable object of type
String
that is non-null.
-
getError
public String getError()
A record of the last error that occurred when the server processed a notification.- Returns:
- An immutable object of type
String
that may be null.
-
getChannel
public Subscription.Channel getChannel()
Details where to send notifications when resources are received that meet the criteria.- Returns:
- An immutable object of type
Subscription.Channel
that is non-null.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildren
in classDomainResource
-
accept
public void accept(String elementName, int elementIndex, Visitor visitor)
Description copied from interface:Visitable
Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:if (visitor.preVisit(this)) { visitor.visitStart(elementName, elementIndex, this); if (visitor.visit(elementName, elementIndex, this)) { // visit children } visitor.visitEnd(elementName, elementIndex, this); visitor.postVisit(this); }
- Specified by:
accept
in interfaceVisitable
- Specified by:
accept
in classAbstractVisitable
- Parameters:
elementName
- the name of the element in the context of this visitelementIndex
- the index of the element in a list or -1 if it is not contained within a Listvisitor
- the visitor to use
-
toBuilder
public Subscription.Builder toBuilder()
Description copied from class:Resource
Create a new Builder from the contents of this Resource- Specified by:
toBuilder
in classDomainResource
-
builder
public static Subscription.Builder builder()
-
-