Copyright © 2010 Open Geospatial Consortium, Inc.
39
R e
s o
u rc
e O
w n
e r
R e
s o
u rc
e M
a n
a g
e r
:R e
s o
u rc
e M
a n
a g
e r
Terminate resource
Terminate Expired
Send termination message
Delete resource
Terminate call
Terminate
«loop» Check termination times
Check termination time
Expired
Stop Stop
Stop [TerminationEventEndpoint
defined] [otherwise]
[resource expired] [otherwise]
Figure 12: Scheduled and Immediate Resource Termination Acitivity
Figure 12 shows that the activities of the resource manager and owner are performed in parallel.
When a resource owner invokes the terminate operation on a resource, a
Terminate
event is emitted.
The resource manager continuously checks the termination times of all resources with lifetime it governs. If a resource has expired, an
Expired
event is emitted. When receiving a
Terminate
or
Expired
event, the resource manager terminates the resource that is pointed to by the event. Before deleting a resource, the resource manager
has to check if a termination message shall be published. In case that a TerminationEventEndpoint was set for the resource, a termination event is sent to that
endpoint.
40
Copyright © 2010 Open Geospatial Consortium, Inc.
Figure 13 shows the state machine of a
Resource
. Note that the renew operation does not lead to a state transition but that the expiration of the termination time or an explicit
terminate request lead to a transition into the final state.
Existent
renew terminate
[termination time before now]
Figure 13: Resource State Machine
6.2.2.2 Managing Subscriptions
Handling subscriptions is one of the most important functionality in a publish subscribe system. A subscriber may create a subscription at a Producer see section 6.2.1.4. Figure
14 shows the activities performed and objects created when initializing a new subscription.
Create subscription resource
Create push subscription
Create pull subscription New Push Subscription :Subscription
this.deliveryTo.endpoint = proposedSubscription.deliveryTo.endpoint
New Pull Subscription :Subscription
this.deliveryTo.endpoint = New_Pull_Point
New Subscription : Subscription
Create pull point
New _Pull_Point : Endpoint
Set new pull point endpoint
Stop [method=pull]
[otherwise] [method=push]
Figure 14: Creating a Subscription – Activity Diagram
Focus is on creating a subscription where the consumer notification is push or pull based. First of all the provider needs to check the delivery method set for the consumer delivery.
Methods currently defined are
push
and
pull
.
Copyright © 2010 Open Geospatial Consortium, Inc.
41 If push based delivery is requested, the provider creates a new subscription object in
which the deliveryTo endpoint is set to the value provided in the proposed subscription. If pull based delivery is requested, the provider first creates a new pull endpoint and then
sets this endpoint as the value of the deliveryTo property of the new subscription object.
The following diagram shows the interactions involved in creating and managing a subscription.
Client Producer
Subscription 1.0 getPublications :
Publication[] 1.1 createSubscription
1.2 subscribeSubscription :Subscription
2.0 getSubscriptions :Subscription[] 3.0 getResourceGenericName :Resource
4.0 renewTM_Instant : Boolean
5.0 terminate : Boolean
Figure 15: Subscriber Interactions
The following table explains the interactions shown in Figure 15.