/** 
 * 
 * Copyright 2004 Protique Ltd
 * 
 * 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.activemq.transport;

import java.util.Collections;
import java.util.EventObject;
import java.util.Map;

/**
 * Represents a discovery event containing the details of the service
 *
 * @version $Revision: 1.1.1.1 $
 */
public class DiscoveryEvent extends EventObject {
    private String serviceName;
    private Map serviceDetails;

    public DiscoveryEvent(DiscoveryAgent source, String serviceName) {
        this(source, serviceName, Collections.EMPTY_MAP);
    }

    public DiscoveryEvent(DiscoveryAgent source, String serviceName, Map serviceDetails) {
        super(source);
        this.serviceName = serviceName;
        this.serviceDetails = serviceDetails;
    }

    public String getServiceName() {
        return serviceName;
    }

    public Map getServiceDetails() {
        return serviceDetails;
    }
    
    public String toString(){
        return "DiscoveryEvent: " + serviceName;
    }
}
