Difference between revisions of "Adding State"
From GCube System
Manuele.simi (Talk | contribs) (→Adding State) |
Manuele.simi (Talk | contribs) (→Multi Port-Type service) |
||
Line 3: | Line 3: | ||
In this part of the tutorial we see how to add a state to the SampleService. | In this part of the tutorial we see how to add a state to the SampleService. | ||
== Multi Port-Type service == | == Multi Port-Type service == | ||
+ | To add a state we need firstly to add two new Port-Types to the SampleService: | ||
+ | # one is dedicated to create a new stateful resource, the so-called ''Factory'' Port-Type | ||
+ | # the other one is dedicated to access and manage the state, the so-called ''Service'' Port-Type | ||
+ | |||
+ | For both, we need to perform the same [[Single_Port-Type#Sketching_Port-type_Interfaces|steps]] done for the Stateless Port-Type: | ||
+ | |||
== Basic steps == | == Basic steps == | ||
== Implementation == | == Implementation == |
Revision as of 17:47, 25 March 2008
Contents
Adding State
In the first part of this tutorial we have created a stateless service for simplicity. However, the most common patterns used when developing gCube services are the ones that allow to create stateful service. In this part of the tutorial we see how to add a state to the SampleService.
Multi Port-Type service
To add a state we need firstly to add two new Port-Types to the SampleService:
- one is dedicated to create a new stateful resource, the so-called Factory Port-Type
- the other one is dedicated to access and manage the state, the so-called Service Port-Type
For both, we need to perform the same steps done for the Stateless Port-Type: