Last change
on this file since 81 was 81, checked in by Bart Vastenhouw, 3 years ago |
Added python timedependent parties (conceder, hardliner, etc)
|
File size:
860 bytes
|
Line | |
---|
1 | from abc import ABC
|
---|
2 |
|
---|
3 | from tudelft.utilities.listener.Listenable import Listenable
|
---|
4 |
|
---|
5 | from geniusweb.profile.Profile import Profile
|
---|
6 |
|
---|
7 |
|
---|
8 | class ProfileInterface (Listenable[Profile] ):
|
---|
9 | '''
|
---|
10 | A container holding a modifyable profile. This interface allows testing.
|
---|
11 | '''
|
---|
12 |
|
---|
13 | def getProfile(self) -> Profile :
|
---|
14 | '''
|
---|
15 | @return the latest version of the profile. May change at any time, after
|
---|
16 | someone updates the version on the server. Call to this may block
|
---|
17 | for limited time if the profile is not yet available.
|
---|
18 | @throws IOException if profile can not be fetched
|
---|
19 | '''
|
---|
20 |
|
---|
21 |
|
---|
22 | def close(self):
|
---|
23 | '''
|
---|
24 | This must be called when the user is finished using the interface. The
|
---|
25 | interface can not be used after calling this. This function allows
|
---|
26 | implementors to release the streams and listeners. Not calling this after
|
---|
27 | use may cause resource leaks.
|
---|
28 | '''
|
---|
Note:
See
TracBrowser
for help on using the repository browser.