river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Example of Generics and Service API.
Date Wed, 29 Dec 2010 10:55:04 GMT
Check out an example of utilising Generics and maintaining runtime type 
safety with Service API.



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.



View raw message