You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Peter Firmstone <ji...@zeus.net.au> on 2010/12/29 11:55:04 UTC
Example of Generics and Service API.
Check out an example of utilising Generics and maintaining runtime type
safety with Service API.
See:
http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/pepe/src/org/apache/river/api/lookup/
StreamServiceRegistrar and MarshalledServiceItem (extends ServiceItem)
are part of the Service API.
ResultStream<T>, is an interface using generics.
StreamServiceRegistrar uses ResultStream, but reverts to the default
type, Object.
ServiceResultStreamFilter and ServiceResultStreamUnmarshaller are client
utility classes that utilise Generic's, implement ResultStream and are
used by the client to manipulate the results from StreamServiceRegistrar
and MarshalledServiceItem.
Cheers,
Peter.