private void error(String message, Location location, Throwable cause) { _factoryParameters.getErrorLog().error(message, location, cause); }
private Map buildServiceMap(List services) { Map result = new HashMap(); Iterator i = services.iterator(); while (i.hasNext()) { EngineServiceContribution contribution = (EngineServiceContribution) i.next(); String name = contribution.getName(); EngineServiceContribution existing = (EngineServiceContribution) result.get(name); if (existing != null) { _errorLog.error( ImplMessages.dupeService(name, existing), existing.getLocation(), null); continue; } result.put(name, contribution); } return result; }
private void addEventListener(Object producer, EventSetDescriptor set, Object consumer, Location location) { Method m = set.getAddListenerMethod(); try { m.invoke(producer, new Object[] { consumer }); } catch (Exception ex) { _errorLog.error(ServiceMessages.unableToAddListener( producer, set, consumer, location, ex), location, ex); } }
private Map buildServiceMap(List services) { Map result = new HashMap(); Iterator i = services.iterator(); while (i.hasNext()) { EngineServiceContribution contribution = (EngineServiceContribution) i.next(); String name = contribution.getName(); EngineServiceContribution existing = (EngineServiceContribution) result.get(name); if (existing != null) { _errorLog.error( ImplMessages.dupeService(name, existing), existing.getLocation(), null); continue; } result.put(name, contribution); } return result; }
private EventSetDescriptor[] findEventSets(Class producerClass) { synchronized (HiveMind.INTROSPECTOR_MUTEX) { try { BeanInfo beanInfo = Introspector.getBeanInfo(producerClass); // Will return an empty array (not null) when the class contains // no event sets. return beanInfo.getEventSetDescriptors(); } catch (IntrospectionException ex) { _errorLog.error( ServiceMessages.unableToIntrospectClass(producerClass, ex), null, ex); return new EventSetDescriptor[0]; } } }
/** * Checks that the number of parameter elements matches the expected count. */ private void checkParameterCounts(ErrorLog log, Occurances expected) { int actual = _convertedParameters.size(); if (expected.inRange(actual)) return; String message = ImplMessages.wrongNumberOfParameters(_factoryServiceId, actual, expected); log.error(message, getLocation(), null); }
private Map buildMapFromContributions(List contributions, String mode) { Map result = new HashMap(); Iterator i = contributions.iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); if (!ic.matchesMode(mode)) continue; String propertyName = ic.getProperty(); InfrastructureContribution existing = (InfrastructureContribution) result .get(propertyName); if (existing != null) { _errorLog.error(ImplMessages.duplicateInfrastructureContribution(ic, existing .getLocation()), ic.getLocation(), null); continue; } result.put(propertyName, ic); } return result; }
private Map buildMapFromContributions(List contributions, String mode) { Map result = new HashMap(); Iterator i = contributions.iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); if (!ic.matchesMode(mode)) continue; String propertyName = ic.getProperty(); InfrastructureContribution existing = (InfrastructureContribution) result .get(propertyName); if (existing != null) { _errorLog.error(ImplMessages.duplicateInfrastructureContribution(ic, existing .getLocation()), ic.getLocation(), null); continue; } result.put(propertyName, ic); } return result; }
private void fireResetEvent() { try { _resetEventHub.fireResetEvent(); } catch (Exception ex) { _errorLog.error(ImplMessages.errorResetting(ex), HiveMind.getLocation(ex), ex); } }
private void fireResetEvent() { try { _resetEventHub.fireResetEvent(); } catch (Exception ex) { _errorLog.error(ImplMessages.errorResetting(ex), HiveMind.getLocation(ex), ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); Iterator i = op.findUnclaimedAbstractProperties().iterator(); while (i.hasNext()) { String name = (String) i.next(); if (name.equals(PROPERTY_NAME)) { try { createProperty(op, name, location); } catch (Exception ex) { _errorLog.error( EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex), location, ex); } break; } } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); Iterator i = op.findUnclaimedAbstractProperties().iterator(); while (i.hasNext()) { String name = (String) i.next(); if (name.equals(PROPERTY_NAME)) { try { createProperty(op, name, location); } catch (Exception ex) { _errorLog.error( EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex), location, ex); } break; } } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); Iterator i = op.findUnclaimedAbstractProperties().iterator(); while (i.hasNext()) { String name = (String) i.next(); try { createProperty(op, name, location); } catch (Exception ex) { _errorLog.error( EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex), location, ex); } } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); Iterator i = op.findUnclaimedAbstractProperties().iterator(); while (i.hasNext()) { String name = (String) i.next(); try { createProperty(op, name, location); } catch (Exception ex) { _errorLog.error( EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex), location, ex); } } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { try { injectRenderWorker(op, spec); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty(PROPERTY_NAME, op.getBaseClass(), ex), spec.getLocation(), ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { try { injectRenderWorker(op, spec); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty(PROPERTY_NAME, op.getBaseClass(), ex), spec.getLocation(), ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { try { injectEventInvoker(op, spec); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty( PROPERTY_NAME, op.getBaseClass(), ex), spec .getLocation(), ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); try { injectMessages(op, location); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty(_messagesProperty, op .getBaseClass(), ex), location, ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { try { injectEventInvoker(op, spec); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty( PROPERTY_NAME, op.getBaseClass(), ex), spec .getLocation(), ex); } }
public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) { Location location = spec.getLocation(); try { injectMessages(op, location); } catch (Exception ex) { _errorLog.error(EnhanceMessages.errorAddingProperty(_messagesProperty, op .getBaseClass(), ex), location, ex); } }