1 | package geniusweb.partiesserver.repository;
|
---|
2 |
|
---|
3 | import geniusweb.party.Capabilities;
|
---|
4 | import geniusweb.party.Party;
|
---|
5 | import tudelft.utilities.repository.RepoElement;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * An interface to an approved and ready to run party. To make a party
|
---|
9 | * available, resources may have to be allocated.
|
---|
10 | */
|
---|
11 | public interface AvailableParty extends RepoElement<String> {
|
---|
12 |
|
---|
13 | /**
|
---|
14 | *
|
---|
15 | * @return the (file) name of the available party
|
---|
16 | */
|
---|
17 | String getName();
|
---|
18 |
|
---|
19 | /**
|
---|
20 | *
|
---|
21 | * @return cached copy of what was received from a call to
|
---|
22 | * {@link Party#getDescription()}.
|
---|
23 | */
|
---|
24 | String getDescription();
|
---|
25 |
|
---|
26 | /**
|
---|
27 | *
|
---|
28 | * @return cached copy of what was received from a call to
|
---|
29 | * {@link AvailableParty#getCapabilities()}
|
---|
30 | */
|
---|
31 | Capabilities getCapabilities();
|
---|
32 |
|
---|
33 | /**
|
---|
34 | *
|
---|
35 | * @return a link to a Party. Notice, Party may be a intermediary,
|
---|
36 | * redirecting data through remote objects
|
---|
37 | * @throws InstantiationFailedException if party can not be instantiated
|
---|
38 | * (this should normally not happen,
|
---|
39 | * since we test thoroughly before a
|
---|
40 | * party is announced Available, but
|
---|
41 | * there might be special cases eg out
|
---|
42 | * of memory)
|
---|
43 | */
|
---|
44 | Party getInstance() throws InstantiationFailedException;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Free resources associated with this . After this call, the AvailableParty
|
---|
48 | * becomes invalid and should be disposed.
|
---|
49 | */
|
---|
50 | void free();
|
---|
51 | }
|
---|