|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Service
This class defines a proxy enabled network service. It is intended both as a fundamental pattern, and an example of a service specification. It is implemented by services that wish to provide proxy functionality. A proxy enabled network service means one that either furnishes, or accepts proxies, or both.
This service would typically be implemented in situations where the benefit is greater to send all, or a portion, of the code to the receiver; instead of passing a lot of data back or forth. This pattern is also ideal for the provision of graphical user interfaces to requesting JVMs.
All services are defined as plain-old Java interfaces. Typically these interfaces contain:
A JVM may furnish as many service objects as it wishes. Normally, related service interfaces are grouped into packages. Typically the javadoc package.html file is used to provide a detailed explanation of the service collection architecture. The package may also include any custom classes shared between the service interfaces, specifically; objects, interfaces, and exceptions. Once a service interface is defined and distributed, it should be considered immutable. Service feature enhancements should be handled through subclasses of the original service interface, to ensure backward compatibility.
Technically speaking:
NB: The service interface is completely cajo project agnostic, as all service definitions properly should be.
Nested Class Summary | |
---|---|
static interface |
Service.Proxy
This class is both used by servers to install proxies in a client's JVM, and by clients to install proxies in a server's JVM. |
Method Summary | |
---|---|
boolean |
isReal()
whilst semantically unrelated to this service, it is just too useful to leave out. |
Service.Proxy |
requestProxy()
used to request a client-side running, server proxy. |
java.lang.Object |
sendProxy(Service.Proxy proxy)
used to send a client's proxy code to run at the service. |
Method Detail |
---|
java.lang.Object sendProxy(Service.Proxy proxy) throws java.lang.ClassNotFoundException
proxy
- an object to be sent to the service, which will
be provided a local reference to the service upon its arrival.
java.lang.ClassNotFoundException
- if the service JVM does not accept
client proxies.Service.Proxy requestProxy() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the client JVM does not accept
service proxies.boolean isReal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |