river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Re: MarshalledServiceItem
Date Wed, 02 Feb 2011 21:35:26 GMT
Peter Firmstone wrote:
>> I'm looking for the simplest thing that will work, then we can look at
>> additions/extensions. Why tackle complicated downloading/classloading 
>> if we
>> can just solve the problem with a simple API extension that gives enough
>> flexibility for the common case?
>>   
>
> The simplified MarshalledServiceItem should be capable of that, the 
> registrar implementation proxy simply doesn't unmarshall until requested.
>
> Cheers,
>
> Peter.
>>
>>  
>>> Hence the method:
>>>
>>>
>>> ResultStream lookup(ServiceTemplate tmpl, Class[] 
>>> unmarshalledEntries, int
>>> maxBatchSize) throws IOException;
>>>
>>> But once we have the service we want, we'll need to download the jar 
>>> files.
>>>
>>>
>>>     
>> Yep,no chance of avoiding that....
>>
>>
>>   
>
>

Currently StreamServiceRegistrar has four methods, these are very 
similar to existing methods in ServiceRegistrar, the difference is they 
return a ResultStream instead of array's, maxBatchSize is an indication 
to the registrar proxy, how many records to cache locally:

ResultStream lookup(ServiceTemplate tmpl, Class[] unmarshalledEntries, 
int maxBatchSize) throws IOException;

ResultStream getEntryClasses(ServiceTemplate tmpl, int maxBatchSize) 
throws IOException;

ResultStream getFieldValues(ServiceTemplate tmpl, int setIndex, String 
field, int maxBatchSize) throws NoSuchFieldException, IOException;

ResultStream getServiceTypes(ServiceTemplate tmpl, String prefix, int 
maxBatchSize) throws IOException;

Apart from lookup, the additional methods may be useful for querying, 
the reasoning is registrars on the internet could potentially have very 
large result sets.  However as Dennis has suggested, the simplest thing 
that will work is to only have the lookup method, which provides to the 
registrar proxy, the classes of the Entry's the client is interested in.

What do you think?

Cheers,

Peter.

Mime
View raw message