private boolean equalTo(final ServiceInjectionSource configuration) { return configuration != null && serviceName.equals(configuration.serviceName); }
private boolean equalTo(final ViewBindingInjectionSource configuration) { return configuration != null && serviceName.equals(configuration.serviceName); }
public static void registerCapabilityServiceName(String capabilityName, ServiceName serviceName) { synchronized (capabilityServiceNames) { // Minor check against misuse ServiceName existing = capabilityServiceNames.get(capabilityName); if (existing != null && ! existing.equals(serviceName)) { throw new IllegalStateException(); } capabilityServiceNames.put(capabilityName, serviceName); } }
private String generateAbsoluteJndiName() { final StringBuffer sb = new StringBuffer(); if (this.parentContextServiceName.equals(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME)) { sb.append("java:jboss/exported/"); } else if (this.parentContextServiceName.equals(ContextNames.JBOSS_CONTEXT_SERVICE_NAME)) { sb.append("java:jboss/"); } else if (this.parentContextServiceName.equals(ContextNames.APPLICATION_CONTEXT_SERVICE_NAME)) { sb.append("java:app/"); } else if (this.parentContextServiceName.equals(ContextNames.MODULE_CONTEXT_SERVICE_NAME)) { sb.append("java:module/"); } else if (this.parentContextServiceName.equals(ContextNames.COMPONENT_CONTEXT_SERVICE_NAME)) { sb.append("java:comp/"); } else if (this.parentContextServiceName.equals(ContextNames.GLOBAL_CONTEXT_SERVICE_NAME)) { sb.append("java:global/"); } else if (this.parentContextServiceName.equals(ContextNames.JAVA_CONTEXT_SERVICE_NAME)) { sb.append("java:/"); } sb.append(this.bindName); return sb.toString(); }
public boolean contains(ServiceName serviceName) { synchronized (this) { if (services != null) { for (BinderService service : services) { if (serviceName.equals(service.getServiceName())) { return true; } } } return false; } }
@Override public boolean equals(Object object) { if (!(object instanceof ServiceNameProvider)) return false; ServiceNameProvider provider = (ServiceNameProvider) object; return this.name.equals(provider.getServiceName()); }
private List<ServiceName> listChildren(final ServiceName name, boolean isContextBinding) throws NamingException { final ConcurrentSkipListSet<ServiceName> boundServices = this.boundServices; if (!isContextBinding && boundServices.contains(name)) { throw NamingLogger.ROOT_LOGGER.cannotListNonContextBinding(); } final NavigableSet<ServiceName> tail = boundServices.tailSet(name); final List<ServiceName> children = new ArrayList<ServiceName>(); for (ServiceName next : tail) { if (name.isParentOf(next)) { if (!name.equals(next)) { children.add(next); } } else { break; } } return children; }
private Name setBaseName() throws NamingException { if (serviceNameBase.equals(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME) || ContextNames.EXPORTED_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:jboss/exported"); if (serviceNameBase.equals(ContextNames.JBOSS_CONTEXT_SERVICE_NAME) || ContextNames.JBOSS_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:jboss"); if (serviceNameBase.equals(ContextNames.APPLICATION_CONTEXT_SERVICE_NAME) || ContextNames.APPLICATION_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:app"); if (serviceNameBase.equals(ContextNames.MODULE_CONTEXT_SERVICE_NAME) || ContextNames.MODULE_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:module"); if (serviceNameBase.equals(ContextNames.COMPONENT_CONTEXT_SERVICE_NAME) || ContextNames.COMPONENT_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:comp"); if (serviceNameBase.equals(ContextNames.GLOBAL_CONTEXT_SERVICE_NAME) || ContextNames.GLOBAL_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:global"); if (serviceNameBase.equals(ContextNames.JAVA_CONTEXT_SERVICE_NAME) || ContextNames.JAVA_CONTEXT_SERVICE_NAME.isParentOf(serviceNameBase)) { return new CompositeName("java:");
if (lookupName.equals(ceiling)) {
final File root = connectorXmlDescriptor == null ? null : connectorXmlDescriptor.getRoot(); DEPLOYMENT_CONNECTOR_LOGGER.debugf("DEPLOYMENT name = %s", deploymentName); final boolean fromModule = duServiceName.getParent().equals(RaOperationUtil.RAR_MODULE); final WildFLyRaDeployer raDeployer = new WildFLyRaDeployer(context.getChildTarget(), url, deploymentName, root, classLoader, cmd, activation, deploymentServiceName, fromModule);
public boolean equals(final Object other) { if (other instanceof PersistenceUnitInjectionSource) { PersistenceUnitInjectionSource source = (PersistenceUnitInjectionSource) other; return (source.puServiceName.equals(puServiceName)); } return false; }
public boolean equals(Object other) { if (other instanceof PersistenceContextInjectionSource) { PersistenceContextInjectionSource source = (PersistenceContextInjectionSource) other; return (source.puServiceName.equals(puServiceName)); } return false; }
/** * Compare this service name to another service name. This is done by comparing the parents and leaf name of * each service name. * * @param o the other service name * @return {@code true} if they are equal, {@code false} if they are not equal or the argument is not a service name or is {@code null} */ @Override public boolean equals(Object o) { return this == o || o instanceof ServiceName && equals((ServiceName)o); }
/** * Compare this service name to another service name. This is done by comparing the parents and leaf name of * each service name. * * @param o the other service name * @return {@code true} if they are equal, {@code false} if they are not equal or the argument is not a service name or is {@code null} */ @Override public boolean equals(Object o) { return this == o || o instanceof ServiceName && equals((ServiceName)o); }
public boolean equals(final Object other) { if (other instanceof PersistenceUnitInjectionSource) { PersistenceUnitInjectionSource source = (PersistenceUnitInjectionSource) other; return (source.puServiceName.equals(puServiceName)); } return false; }
private void assertNotInstanceId(final ServiceName dependency) { if (getServiceId().equals(dependency)) { throw new IllegalArgumentException("Cannot both require and provide same dependency:" + dependency); } }
public boolean contains(ServiceName serviceName) { synchronized (this) { if (services != null) { for (BinderService service : services) { if (serviceName.equals(service.getServiceName())) { return true; } } } return false; } }
/** * Determine whether this service name is the same as, or a parent of, the given service name. * * @param other the other name * @return {@code true} if this service name is a parent */ public boolean isParentOf(ServiceName other) { return other != null && (equals(other) || isParentOf(other.parent)); }
/** * Determine whether this service name is the same as, or a parent of, the given service name. * * @param other the other name * @return {@code true} if this service name is a parent */ public boolean isParentOf(ServiceName other) { return other != null && (equals(other) || isParentOf(other.parent)); }
public boolean contains(ServiceName serviceName) { synchronized (this) { if (services != null) { for (BinderService service : services) { if (serviceName.equals(service.getServiceName())) { return true; } } } return false; } }