|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A service handle is what the service publishes towards the servers and it's fellow
services. This should not be confused with the Service interface which is what
the framework sees and uses.
Services should usually subclass this interface with their service public contract. Doing so provides not only higher flexibility but also gives the service and the service registry to insert fine granied security check is necessary.
Services should use the ServicePermission object to grant access control on getStatus
and optionally on execution methods. The code for doing so probably looks something like this:
public Status getStatus() {
String ID = // get Service id
SecurityManager man = System.getSecurityManager();
if(man != null) man.checkPermission(new ServicePermission(ID, "status"));
...
Status ServicePermission| Method Summary | |
Status |
getStatus()
Get the status of the service. |
| Method Detail |
public Status getStatus()
status of the service. The service is free to do a security check before
returning the status, but must never return null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||