Return-Path: Delivered-To: apmail-incubator-river-dev-archive@minotaur.apache.org Received: (qmail 37570 invoked from network); 5 Feb 2011 10:37:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Feb 2011 10:37:05 -0000 Received: (qmail 87286 invoked by uid 500); 5 Feb 2011 10:37:05 -0000 Delivered-To: apmail-incubator-river-dev-archive@incubator.apache.org Received: (qmail 87171 invoked by uid 500); 5 Feb 2011 10:37:03 -0000 Mailing-List: contact river-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: river-dev@incubator.apache.org Delivered-To: mailing list river-dev@incubator.apache.org Received: (qmail 87159 invoked by uid 99); 5 Feb 2011 10:37:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Feb 2011 10:37:02 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [61.9.168.140] (HELO nskntmtas02p.mx.bigpond.com) (61.9.168.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Feb 2011 10:36:53 +0000 Received: from nskntotgx02p.mx.bigpond.com ([61.9.223.241]) by nskntmtas02p.mx.bigpond.com with ESMTP id <20110205103631.JWGJ3622.nskntmtas02p.mx.bigpond.com@nskntotgx02p.mx.bigpond.com> for ; Sat, 5 Feb 2011 10:36:31 +0000 Received: from [10.1.1.2] (really [61.9.223.241]) by nskntotgx02p.mx.bigpond.com with ESMTP id <20110205103630.CDQU4790.nskntotgx02p.mx.bigpond.com@[10.1.1.2]> for ; Sat, 5 Feb 2011 10:36:30 +0000 Message-ID: <4D4D26B2.9090402@zeus.net.au> Date: Sat, 05 Feb 2011 20:30:10 +1000 From: Peter Firmstone User-Agent: Thunderbird 2.0.0.14 (X11/20080531) MIME-Version: 1.0 To: river-dev@incubator.apache.org Subject: Re: MarshalledServiceItem References: <4D45C8A5.6010309@zeus.net.au> <4D485B3A.4050508@cox.net> <4D49D242.5010702@wonderly.org> <4D49ED2F.9050000@zeus.net.au> <4D49F3A5.9070104@zeus.net.au> <4D49F7B9.7060201@wonderly.org> <4D4A41CD.5060500@zeus.net.au> <4D4A70FF.2060904@zeus.net.au> <4D4A7C96.8060305@zeus.net.au> <4D4B20E7.3060900@zeus.net.au> <53CE3906-CFC2-4DBF-9322-55AA0C9C0A0E@topiatechnology.com> <4D4B45E3.9070000@zeus.net.au> <4D4BD4CC.2020902@zeus.net.au> <4D4D1CD4.90405@zeus.net.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150204.4D4D282F.0022,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org How's this? /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.river.api.lookup; import java.io.IOException; import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceTemplate; import net.jini.core.lookup.ServiceItem; import org.apache.river.api.util.ResultStream; /** * Defines an extension interface to the lookup service, for use on large or * global networks such as the internet or low bandwidth networks. * The interface is not a remote interface; each implementation of the * lookup service exports proxy objects that implement the * StreamServiceRegistrar interface local to the client, using an * implementation-specific protocol to communicate with the actual remote * server. All of the proxy methods obey normal RMI remote interface * semantics except where explicitly noted. Two proxy objects are equal if * they are proxies for the same lookup service. Every method invocation * (on both StreamServiceRegistrar and ServiceRegistration) is atomic with * respect to other invocations. * * The StreamServiceRegistrar is intended to perform the same function * as the ServiceRegistrar, but with the ability to return results as a * stream, so memory consumption is minimised at the client and network * communication is minimised between the client and lookup service server. * * All clients utilising ServiceRegistrar, should switch to the * StreamServiceRegistrar. * * @see ServiceRegistrar * @see PortableServiceRegistrar * @see ServiceRegistration * @author Peter Firmstone * @since 2.2.0 */ public interface StreamServiceRegistrar extends ServiceRegistrar{ /** * Returns a ResultStream that provides access to ServiceClasspathSubItem * instances. The ResultStream terminates with a null value. The result * stream may be infinite, or limited by an integer limit value. * * A ServiceClasspathSubItem implementation instance is a ServiceItem that * contains only Objects that are resolvable on the local classpath, * this is useful for clients to perform filtering before requiring a * download of the actual ServiceItem. * * The ResultStream should be closed once the desired service has been * found, or services have been processed. * * @param tmpl template to match * specified template * * @param maxBatchSize held locally, larger batch sizes reduce network * traffic, but may delay processing locally depending on implementation. * @param limit - Zero for infinite, otherwise limits the number of matching * results. * @return ResultStream containing ServiceItem's * @throws java.io.IOException * @see ServiceItem * @see ServiceClasspathSubItem * @see ResultStream * @see ServiceResultStreamFilter * @see ResultStreamUnmarshaller * @since 2.2.0 */ ResultStream lookup(ServiceTemplate tmpl, Class[] entryClasses, int maxBatchSize, int limit) throws IOException; }