You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2005/08/29 20:17:29 UTC
cvs commit: ws-wsrp4j/sandbox/wsrp4j/commons-producer/src/java/org/apache/wsrp4j/commons/producer/interfaces ConsumerRegistry.java ConsumerRegistryFactory.java
dlouzan 2005/08/29 11:17:29
Added: sandbox/wsrp4j/commons-producer/src/java/org/apache/wsrp4j/commons/producer/interfaces
ConsumerRegistry.java ConsumerRegistryFactory.java
Log:
Initial commit.
Revision Changes Path
1.1 ws-wsrp4j/sandbox/wsrp4j/commons-producer/src/java/org/apache/wsrp4j/commons/producer/interfaces/ConsumerRegistry.java
Index: ConsumerRegistry.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed 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.wsrp4j.commons.producer.interfaces;
import java.util.Iterator;
import oasis.names.tc.wsrp.v1.types.RegistrationData;
import org.apache.wsrp4j.commons.exception.WSRPException;
/**
* This interface provides access to the ConsumerRegistry. The ConsumerRegistry
* keeps all Consumer registrations with this Producer. All registrations are
* identified by a registration handle.
*
* @author <a href="mailto:stefan.behl@de.ibm.com">Stefan Behl</a>
* @version $Id: ConsumerRegistry.java,v 1.1 2005/08/29 18:17:29 dlouzan Exp $
*/
public interface ConsumerRegistry {
/**
* Provides information about whether this producer requires
* registration or not.
*
* @return A boolean indicating whether registration is required or not.
*/
boolean isRegistrationRequired();
/**
* Creates a new registration-object for a certain consumer,
* adds it to the consumer registry and returns it.
*
* @param registrationData RegistrationData-object
*
* @return new registration-object
*/
Registration register(RegistrationData registrationData)
throws WSRPException;
/**
* Returns a certain registration identified by regHandle.
*
* @param regHandle String representing the regHandle.
*
* @return registration-object identified by regHandle.
*/
Registration get(String regHandle);
/**
* Returns all registrations (of all consumers) currently stored
* in the consumer registry.
*
* @return Iterator of a registration collection containing all
* registrations.
*/
Iterator getAll();
/**
* Deletes the registration of a certain consumer (identified by regHandle).
*
* @param regHandle String representing the regHandle.
*/
void deregister(String regHandle);
/**
* Evaluates whether a consumer identified by regHandle is
* registered or not.
*
* @param regHandle String representing the regHandle.
*
* @returns A boolean indicating whether registration exists or not.
* Returns true if registration exists, else false.
*/
boolean check(String regHandle);
}
1.1 ws-wsrp4j/sandbox/wsrp4j/commons-producer/src/java/org/apache/wsrp4j/commons/producer/interfaces/ConsumerRegistryFactory.java
Index: ConsumerRegistryFactory.java
===================================================================
/*
* Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed 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.wsrp4j.commons.producer.interfaces;
import org.apache.wsrp4j.commons.exception.WSRPException;
import org.apache.wsrp4j.commons.producer.provider.interfaces.Provider;
/**
* This class provides an interface to any ConsumerRegistry.
*
* @author <a href="mailto:stefan.behl@de.ibm.com">Stefan Behl</a>
* @version $Id: ConsumerRegistryFactory.java,v 1.1 2005/08/29 18:17:29 dlouzan Exp $
*/
public interface ConsumerRegistryFactory {
/**
* Returns an instance of ConsumerRegistry by calling the constructor
* of the corresponding class implementing the ConsumerRegistry-Interface
*
* @return ConsumerRegistry An instance of any class implementing the
* ConsumerRegistry.
*/
ConsumerRegistry getConsumerRegistry(Provider provider)
throws WSRPException;
}