public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TargetImpl)) return false; final TargetImpl target = (TargetImpl) o; if (!name.equals(target.name)) return false; return true; }
public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof GBeanInstance)) return false; return abstractName.equals(((GBeanInstance) obj).abstractName); }
public boolean equals(Object other) { if (other instanceof ReferencePatterns) { ReferencePatterns otherRefPat = (ReferencePatterns) other; if (abstractName != null) { return abstractName.equals(otherRefPat.abstractName); } return patterns.equals(otherRefPat.patterns); } return false; }
private void removeGBean(AbstractName name) { for (Iterator it = forwards.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); ForwardData data = (ForwardData) entry.getValue(); if(data.getGbean().equals(name)) { it.remove(); break; } } }
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final GBeanDependency that = (GBeanDependency) o; if (gbeanInstance != null ? !gbeanInstance.equals(that.gbeanInstance) : that.gbeanInstance != null) { return false; } return !(targetName != null ? !targetName.equals(that.targetName) : that.targetName != null); }
public Object invoke(AbstractName abstractName, Object[] arguments) throws Throwable { AbstractName proxyTarget = kernel.getAbstractNameFor(arguments[0]); return Boolean.valueOf(abstractName.equals(proxyTarget)); } }
protected void stopOfflineConfigurationManager() throws GBeanNotFoundException { Set names = kernel.listGBeans(new AbstractNameQuery(ConfigurationManager.class.getName())); for (Iterator iterator = names.iterator(); iterator.hasNext();) { AbstractName abstractName = (AbstractName) iterator.next(); if (!onlineDeployerConfigurationManagerName.equals(abstractName)) { kernel.stopGBean(abstractName); } } }
public List listConfigurations(AbstractName storeName) throws NoSuchStoreException { List storeSnapshot = getStoreList(); for (int i = 0; i < storeSnapshot.size(); i++) { ConfigurationStore store = (ConfigurationStore) storeSnapshot.get(i); if (storeName.equals(store.getAbstractName())) { return listConfigurations(store); } } throw new NoSuchStoreException("No such store: " + storeName); }
if (bindings == null) continue; if (first(bindings).getKey().equals(abstractName)) { bindings.remove(abstractName); Map.Entry<AbstractName, Object> newEntry = first(bindings);
public NetworkConnector[] getConnectorsForContainer(Object broker) { AbstractName containerName = kernel.getAbstractNameFor(broker); ProxyManager mgr = kernel.getProxyManager(); try { List results = new ArrayList(); AbstractNameQuery query = new AbstractNameQuery(ActiveMQConnector.class.getName()); Set set = kernel.listGBeans(query); // all Jetty connectors for (Iterator it = set.iterator(); it.hasNext();) { AbstractName name = (AbstractName) it.next(); // a single Jetty connector GBeanData data = kernel.getGBeanData(name); ReferencePatterns refs = data.getReferencePatterns("brokerService"); if (containerName.equals(refs.getAbstractName())) { results.add(mgr.createProxy(name, ActiveMQConnector.class.getClassLoader())); } } return (ActiveMQConnector[]) results.toArray(new ActiveMQConnector[results.size()]); } catch (Exception e) { throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for ActiveMQ broker '"+containerName).initCause(e); } }
/** * Gets the ObjectNames of any existing connectors for the specified container. */ public NetworkConnector[] getConnectorsForContainer(Object container) { AbstractName containerName = kernel.getAbstractNameFor(container); ProxyManager mgr = kernel.getProxyManager(); try { List results = new ArrayList(); AbstractNameQuery query = new AbstractNameQuery(TomcatWebConnector.class.getName()); Set set = kernel.listGBeans(query); // all Tomcat connectors for (Iterator it = set.iterator(); it.hasNext();) { AbstractName name = (AbstractName) it.next(); // a single Tomcat connector GBeanData data = kernel.getGBeanData(name); ReferencePatterns refs = data.getReferencePatterns(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE); if (containerName.equals(refs.getAbstractName())) { results.add(mgr.createProxy(name, TomcatWebConnector.class.getClassLoader())); } } return (TomcatWebConnector[]) results.toArray(new TomcatWebConnector[results.size()]); } catch (Exception e) { throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Tomcat container '"+containerName).initCause(e); } }
/** * Gets the ObjectNames of any existing connectors for the specified container. */ public NetworkConnector[] getConnectorsForContainer(Object container) { AbstractName containerName = kernel.getAbstractNameFor(container); ProxyManager mgr = kernel.getProxyManager(); try { List results = new ArrayList(); AbstractNameQuery query = new AbstractNameQuery(TomcatWebConnector.class.getName()); Set set = kernel.listGBeans(query); // all Tomcat connectors for (Iterator it = set.iterator(); it.hasNext();) { AbstractName name = (AbstractName) it.next(); // a single Tomcat connector GBeanData data = kernel.getGBeanData(name); ReferencePatterns refs = data.getReferencePatterns(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE); if (containerName.equals(refs.getAbstractName())) { results.add(mgr.createProxy(name, TomcatWebConnector.class.getClassLoader())); } } return (TomcatWebConnector[]) results.toArray(new TomcatWebConnector[results.size()]); } catch (Exception e) { throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Tomcat container '"+containerName).initCause(e); } }
if(containerName.equals(refs.getAbstractName())) { try { String testProtocol = (String) kernel.getAttribute(name, "protocol");
if(containerName.equals(refs.getAbstractName())) { try { String testProtocol = (String) kernel.getAttribute(name, "protocol");
if(containerName.equals(refs.getAbstractName())) { try { String testProtocol = (String) kernel.getAttribute(name, "protocol");
if (!earContext.getModuleName().equals(resourceAdapterModuleName)) { resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_APPLICATION, earContext.getModuleName());
if (!earContext.getModuleName().equals(resourceAdapterModuleName)) { resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_APPLICATION, earContext.getModuleName());