@Override public boolean matches(Descriptor d) { if (name == null) { if (d.getName() == null) return true; return false; } return true; }
@Override public boolean matches(Descriptor d) { if (name == null) { if (d.getName() == null) return true; return false; } return true; }
@Override public String getName() { return baseDescriptor.getName(); }
@Override public String getName() { return baseDescriptor.getName(); }
@Override public String getName() { return filterDescriptor.getName(); }
@Override public String getName() { return baseDescriptor.getName(); }
@Override public String getName() { return baseDescriptor.getName(); }
@Override public boolean matches(Descriptor arg0) { String name = arg0.getName(); if (name != null && name.equals(commandName)) { return true; } return false; } });
/** * The given descriptor was processing during a * cancellation of the job * * @param d The non-null descriptor that was cancelled */ public WasCancelledException(Descriptor d) { super("A run-level service with name \"" + ((d.getName() == null) ? "" : d.getName()) + "\" and implementation " + d.getImplementation() + " was cancelled"); }
@Override public boolean matches(Descriptor d) { for (Filter filter : allFilters) { if (filter instanceof IndexedFilter) { IndexedFilter iFilter = (IndexedFilter) filter; String name = iFilter.getName(); if (name != null) { if (!GeneralUtilities.safeEquals(name, d.getName())) continue; } String contract = iFilter.getAdvertisedContract(); if (contract != null) { if (!d.getAdvertisedContracts().contains(contract)) continue; } } if (filter.matches(d)) return true; } return false; }
@Override public boolean matches(Descriptor d) { for (Filter filter : allFilters) { if (filter instanceof IndexedFilter) { IndexedFilter iFilter = (IndexedFilter) filter; String name = iFilter.getName(); if (name != null) { if (!GeneralUtilities.safeEquals(name, d.getName())) continue; } String contract = iFilter.getAdvertisedContract(); if (contract != null) { if (!d.getAdvertisedContracts().contains(contract)) continue; } } if (filter.matches(d)) return true; } return false; }
@Override public boolean matches(Descriptor d) { for (Filter filter : allFilters) { if (filter instanceof IndexedFilter) { IndexedFilter iFilter = (IndexedFilter) filter; String name = iFilter.getName(); if (name != null) { if (!GeneralUtilities.safeEquals(name, d.getName())) continue; } String contract = iFilter.getAdvertisedContract(); if (contract != null) { if (!d.getAdvertisedContracts().contains(contract)) continue; } } if (filter.matches(d)) return true; } return false; }
/** * This method creates a filter that will match one and only one descriptor. The passed * in descriptor must have both its serviceID and locatorId filled in, or else this * method will throw an IllegalArgumentException * * @param descriptor The descriptor from which to create a filter * @return A filter to use that will match this descriptor exactly */ public static IndexedFilter createSpecificDescriptorFilter(Descriptor descriptor) { String contract = ServiceLocatorUtilities.getBestContract(descriptor); String name = descriptor.getName(); if (descriptor.getServiceId() == null) { throw new IllegalArgumentException("The descriptor must have a specific service ID"); } if (descriptor.getLocatorId() == null) { throw new IllegalArgumentException("The descriptor must have a specific locator ID"); } return new SpecificFilterImpl(contract, name, descriptor.getServiceId(), descriptor.getLocatorId()); }
/** * This method creates a filter that will match one and only one descriptor. The passed * in descriptor must have both its serviceID and locatorId filled in, or else this * method will throw an IllegalArgumentException * * @param descriptor The descriptor from which to create a filter * @return A filter to use that will match this descriptor exactly */ public static IndexedFilter createSpecificDescriptorFilter(Descriptor descriptor) { String contract = ServiceLocatorUtilities.getBestContract(descriptor); String name = descriptor.getName(); if (descriptor.getServiceId() == null) { throw new IllegalArgumentException("The descriptor must have a specific service ID"); } if (descriptor.getLocatorId() == null) { throw new IllegalArgumentException("The descriptor must have a specific locator ID"); } return new SpecificFilterImpl(contract, name, descriptor.getServiceId(), descriptor.getLocatorId()); }
@Override public boolean matches(Descriptor d) { for (Filter filter : allFilters) { if (filter instanceof IndexedFilter) { IndexedFilter iFilter = (IndexedFilter) filter; String name = iFilter.getName(); if (name != null) { if (!GeneralUtilities.safeEquals(name, d.getName())) continue; } String contract = iFilter.getAdvertisedContract(); if (contract != null) { if (!d.getAdvertisedContracts().contains(contract)) continue; } } if (filter.matches(d)) return true; } return false; }
/** * This method creates a filter that will match one and only one descriptor. The passed * in descriptor must have both its serviceID and locatorId filled in, or else this * method will throw an IllegalArgumentException * * @param descriptor The descriptor from which to create a filter * @return A filter to use that will match this descriptor exactly */ public static IndexedFilter createSpecificDescriptorFilter(Descriptor descriptor) { String contract = ServiceLocatorUtilities.getBestContract(descriptor); String name = descriptor.getName(); if (descriptor.getServiceId() == null) { throw new IllegalArgumentException("The descriptor must have a specific service ID"); } if (descriptor.getLocatorId() == null) { throw new IllegalArgumentException("The descriptor must have a specific locator ID"); } return new SpecificFilterImpl(contract, name, descriptor.getServiceId(), descriptor.getLocatorId()); }
/** * This method creates a filter that will match one and only one descriptor. The passed * in descriptor must have both its serviceID and locatorId filled in, or else this * method will throw an IllegalArgumentException * * @param descriptor The descriptor from which to create a filter * @return A filter to use that will match this descriptor exactly */ public static IndexedFilter createSpecificDescriptorFilter(Descriptor descriptor) { String contract = ServiceLocatorUtilities.getBestContract(descriptor); String name = descriptor.getName(); if (descriptor.getServiceId() == null) { throw new IllegalArgumentException("The descriptor must have a specific service ID"); } if (descriptor.getLocatorId() == null) { throw new IllegalArgumentException("The descriptor must have a specific locator ID"); } return new SpecificFilterImpl(contract, name, descriptor.getServiceId(), descriptor.getLocatorId()); }
public boolean equals(Object a) { if (a == null) return false; if (!(a instanceof Descriptor)) return false; Descriptor d = (Descriptor) a; if (!GeneralUtilities.safeEquals(implementation, d.getImplementation())) return false; if (!equalOrderedCollection((contracts == null) ? EMPTY_CONTRACTS_SET : contracts, d.getAdvertisedContracts())) return false; if (!GeneralUtilities.safeEquals(name, d.getName())) return false; if (!GeneralUtilities.safeEquals(scope, d.getScope())) return false; if (!equalOrderedCollection((qualifiers == null) ? EMPTY_QUALIFIER_SET : qualifiers, d.getQualifiers())) return false; if (!GeneralUtilities.safeEquals(descriptorType, d.getDescriptorType())) return false; if (!GeneralUtilities.safeEquals(descriptorVisibility, d.getDescriptorVisibility())) return false; if (!equalMetadata((metadatas == null) ? EMPTY_METADATAS_MAP : metadatas, d.getMetadata())) return false; if (!GeneralUtilities.safeEquals(proxiable, d.isProxiable())) return false; if (!GeneralUtilities.safeEquals(proxyForSameScope, d.isProxyForSameScope())) return false; if (!GeneralUtilities.safeEquals(analysisName, d.getClassAnalysisName())) return false; return true; }
public boolean equals(Object a) { if (a == null) return false; if (!(a instanceof Descriptor)) return false; Descriptor d = (Descriptor) a; if (!GeneralUtilities.safeEquals(implementation, d.getImplementation())) return false; if (!equalOrderedCollection((contracts == null) ? EMPTY_CONTRACTS_SET : contracts, d.getAdvertisedContracts())) return false; if (!GeneralUtilities.safeEquals(name, d.getName())) return false; if (!GeneralUtilities.safeEquals(scope, d.getScope())) return false; if (!equalOrderedCollection((qualifiers == null) ? EMPTY_QUALIFIER_SET : qualifiers, d.getQualifiers())) return false; if (!GeneralUtilities.safeEquals(descriptorType, d.getDescriptorType())) return false; if (!GeneralUtilities.safeEquals(descriptorVisibility, d.getDescriptorVisibility())) return false; if (!equalMetadata((metadatas == null) ? EMPTY_METADATAS_MAP : metadatas, d.getMetadata())) return false; if (!GeneralUtilities.safeEquals(proxiable, d.isProxiable())) return false; if (!GeneralUtilities.safeEquals(proxyForSameScope, d.isProxyForSameScope())) return false; if (!GeneralUtilities.safeEquals(analysisName, d.getClassAnalysisName())) return false; return true; }
public boolean equals(Object a) { if (a == null) return false; if (!(a instanceof Descriptor)) return false; Descriptor d = (Descriptor) a; if (!GeneralUtilities.safeEquals(implementation, d.getImplementation())) return false; if (!equalOrderedCollection((contracts == null) ? EMPTY_CONTRACTS_SET : contracts, d.getAdvertisedContracts())) return false; if (!GeneralUtilities.safeEquals(name, d.getName())) return false; if (!GeneralUtilities.safeEquals(scope, d.getScope())) return false; if (!equalOrderedCollection((qualifiers == null) ? EMPTY_QUALIFIER_SET : qualifiers, d.getQualifiers())) return false; if (!GeneralUtilities.safeEquals(descriptorType, d.getDescriptorType())) return false; if (!GeneralUtilities.safeEquals(descriptorVisibility, d.getDescriptorVisibility())) return false; if (!equalMetadata((metadatas == null) ? EMPTY_METADATAS_MAP : metadatas, d.getMetadata())) return false; if (!GeneralUtilities.safeEquals(proxiable, d.isProxiable())) return false; if (!GeneralUtilities.safeEquals(proxyForSameScope, d.isProxyForSameScope())) return false; if (!GeneralUtilities.safeEquals(analysisName, d.getClassAnalysisName())) return false; return true; }