|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OCSServerUserInterface
An interface containing OCSServer methods accessible to all users. A proxy of this interface can be obtained from an OCSClient to invoke user methods on the associated OCSServer. Calling these methods may require authentication, just like calling methods on proxies in general.
OCSServer
,
OCSClient.getServerUserProxy()
,
OCSServerAdminInterface
Method Summary | |
---|---|
java.lang.String |
addSubject(java.lang.Object subject)
Adds a subject to the server. |
java.lang.String |
addSubject(java.lang.Object subject,
boolean gc)
Adds a subject to the server. |
java.lang.String |
addSubject(java.lang.Object subject,
java.lang.Class c,
java.lang.String id)
Adds a subject associated with some class to the server. |
java.lang.String |
addSubject(java.lang.Object subject,
java.lang.Class c,
java.lang.String id,
boolean gc)
Adds a subject associated with some class to the server. |
java.lang.String |
addSubject(java.lang.Object subject,
java.lang.String id)
Adds a subject to the server. |
java.lang.String |
addSubject(java.lang.Object subject,
java.lang.String id,
boolean gc)
Adds a subject to the server. |
boolean |
existsSubject(java.lang.Class c)
Tells whether at least one subject of a certain class exists on this server |
boolean |
existsSubject(java.lang.Class c,
java.lang.String id)
Tells whether a certain subject exists on this server |
java.lang.String |
getHostAddress()
Returns the IP of the host |
java.lang.String |
getHostName()
Returns the name of the host |
int |
getPort()
Returns the port which this server listens at |
java.lang.Object |
getSubject(java.lang.Class c)
Returns an arbitrary instance of a subject class |
java.lang.Object |
getSubject(java.lang.Class c,
java.lang.String id)
Returns an identified instance of a subject class. |
java.util.List<java.lang.Class> |
getSubjectClasses()
Returns the classes of which instances (subjects) exist on this server |
java.lang.String |
getSubjectID(java.lang.Class c)
Returns the ID of an arbitrary instance of a subject class |
java.util.List<java.lang.String> |
getSubjectNames(java.lang.Class c)
Returns the names of subjects of a certain class. |
boolean |
isLocal()
Tells whether the server is working in local mode, configured to be referenced directly by a client |
boolean |
removeSubject(java.lang.Class c,
java.lang.String id)
Removes a subject from this server |
boolean |
removeSubjects()
Removes all subjects from this server |
boolean |
removeSubjects(java.lang.Class c)
Removes all subjects of a given class from this server |
Method Detail |
---|
java.lang.String getHostAddress()
java.lang.String getHostName()
int getPort()
java.lang.String addSubject(java.lang.Object subject, java.lang.Class c, java.lang.String id, boolean gc) throws OCSException
Adds a subject associated with some class to the server. The specified class may be a base class of the subject. If the specified class is neither identical to the subject's class nor one of its base classes, an OCSException is thrown. The subject will be associated with an ID. If no ID is specified, it will be supplied automatically. The subject can be marked for garbage collection so that it will be removed if all proxies that may attach to it detach from it again.
subject
- the subjectc
- the class of the subject or a base class thereofid
- the ID to associate the subject with (may be null)gc
- garbage collect the subject once all proxies detach from it?
OCSException
java.lang.String addSubject(java.lang.Object subject, java.lang.Class c, java.lang.String id) throws OCSException
Adds a subject associated with some class to the server. The specified class may be a base class of the subject. If the specified class is neither identical to the subject's class nor one of its base classes, an OCSException is thrown. The subject will be associated with an ID. If no ID is specified, it will be supplied automatically. The subject is not marked for garbage collection, so it will stay on if proxies that may attach to it detach again.
subject
- the subjectc
- the class of the subject or a base class thereofid
- the ID to associate the subject with (may be null)
OCSException
java.lang.String addSubject(java.lang.Object subject, java.lang.String id, boolean gc) throws OCSException
Adds a subject to the server. The subject will be associated with an ID. If no ID is specified, it will be supplied automatically. The subject can be marked for garbage collection so that it will be removed if all proxies that may attach to it detach from it again.
subject
- the subjectid
- the ID to associate the subject with (may be null)gc
- garbage collect the subject once all proxies detach from it?
OCSException
java.lang.String addSubject(java.lang.Object subject, java.lang.String id) throws OCSException
Adds a subject to the server. The subject gets associated with an ID. If none is specified, the ID is supplied automatically. The subject is not marked for garbage collection, so it will stay on if proxies that may attach to it detach again.
subject
- the subjectid
- the ID to associate the subject with (may be null)
OCSException
java.lang.String addSubject(java.lang.Object subject, boolean gc) throws OCSException
Adds a subject to the server. The subject's ID is supplied automatically. The subject can be marked for garbage collection so that it will be removed if all proxies that may attach to it detach from it again.
subject
- the subjectgc
- garbage collect the subject once all proxies detach from it?
OCSException
java.lang.String addSubject(java.lang.Object subject) throws OCSException
Adds a subject to the server. The subject's ID is supplied automatically. The subject is not marked for garbage collection, so it will stay on if proxies that may attach to it detach again.
subject
- the subject
OCSException
boolean removeSubject(java.lang.Class c, java.lang.String id)
c
- the class of the subjectid
- the ID of the subject
boolean removeSubjects(java.lang.Class c)
c
- the class of the subject
boolean removeSubjects()
boolean existsSubject(java.lang.Class c)
c
- the class of the subject
boolean existsSubject(java.lang.Class c, java.lang.String id)
c
- the class of the subjectid
- the ID of the subject
java.util.List<java.lang.String> getSubjectNames(java.lang.Class c)
Returns the names of subjects of a certain class. If null is specified for the class, the names of all subjects of whatever class are returned.
c
- the class to which the request is restricted
java.util.List<java.lang.Class> getSubjectClasses()
java.lang.String getSubjectID(java.lang.Class c)
c
- the subject class
java.lang.Object getSubject(java.lang.Class c, java.lang.String id)
Returns an identified instance of a subject class. Note: If null is specified as the ID, null will be returned. Use getSubject(Class c) to retrieve an arbitrary instance of a subject class.
c
- the class of the requested subjectid
- the ID of the subject
java.lang.Object getSubject(java.lang.Class c)
c
- the class of the requested subject
boolean isLocal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |