001    // Copyright 2004, 2005 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.hivemind.service.impl;
016    
017    import org.apache.hivemind.impl.BaseLocatable;
018    
019    /**
020     * An event registrtion for a service constructed by
021     * {@link org.apache.hivemind.service.impl.BuilderFactory}.
022     *
023     * @author Howard Lewis Ship
024     */
025    public class EventRegistration extends BaseLocatable
026    {
027            private Object _producer;
028            private String _eventSetName;
029            
030            /**
031             * The name of the event set to which the constructed service should be registered,
032             * or null to register the constructed service for any event sets it matches (any
033             * listener interfaces it implements tht match the event sets implemented by
034             * the producer).
035             */
036        public String getEventSetName()
037        {
038            return _eventSetName;
039        }
040    
041            /**
042             * Another service which is a producer of events to which the constructed service
043             * will be subscribed.
044             */
045        public Object getProducer()
046        {
047            return _producer;
048        }
049    
050        public void setEventSetName(String string)
051        {
052            _eventSetName = string;
053        }
054    
055        public void setProducer(Object object)
056        {
057            _producer = object;
058        }
059    
060    }