1 19 package org.netbeans.modules.serviceapi; 20 21 import java.beans.PropertyChangeListener ; 22 import java.beans.PropertyChangeSupport ; 23 import java.util.Collection ; 24 import java.util.List ; 25 import org.openide.nodes.Node; 26 27 36 public abstract class ServiceComponent { 37 38 public static final String SERVICE_INTERFACE_ADDED_PROPERTY = "serviceInterfaceAdded"; 39 public static final String SERVICE_INTERFACE_REMOVED_PROPERTY = "serviceInterfaceRemoved"; 40 41 private PropertyChangeSupport propSupport; 42 45 public void addPropertyChangeListener(PropertyChangeListener listener) { 46 propSupport.addPropertyChangeListener(listener); 47 } 48 51 public void removePropertyChangeListener(PropertyChangeListener listener) { 52 propSupport.removePropertyChangeListener(listener); 53 } 54 55 59 public abstract List <ServiceInterface> getServiceProviders(); 60 63 public abstract List <ServiceInterface> getServiceConsumers(); 64 65 68 public abstract Collection <ServiceLink> getServiceLinks(); 69 70 75 public abstract Node getNode(); 76 77 79 86 public abstract ServiceInterface createServiceInterface(InterfaceDescription description, boolean provider); 87 88 91 public abstract ServiceInterface createServiceInterface(ServiceInterface other); 92 93 98 public abstract void removeServiceInterface(ServiceInterface serviceInterface); 99 100 } 101 | Popular Tags |