public void run() { try { executeTick(); } catch (Exception e) { SIMULATED_EXCHANGE_TICK_ERROR.warn(SimulatedExchange.class, e, getName()); } } },
if(LogEventLevel.DEBUG.equals(inEvent.getLevel())) { if(exception == null) { MESSAGE_1P.debug(Strategy.STRATEGY_MESSAGES, message); } else { MESSAGE_1P.debug(Strategy.STRATEGY_MESSAGES, exception, message); MESSAGE_1P.info(Strategy.STRATEGY_MESSAGES, message); } else { MESSAGE_1P.info(Strategy.STRATEGY_MESSAGES, exception, message); MESSAGE_1P.warn(Strategy.STRATEGY_MESSAGES, message); } else { MESSAGE_1P.warn(Strategy.STRATEGY_MESSAGES, exception, message); MESSAGE_1P.error(Strategy.STRATEGY_MESSAGES, message); } else { MESSAGE_1P.error(Strategy.STRATEGY_MESSAGES, exception, message);
@Override public PrintStream getStream(String inName) throws IOException { System.err.println(Messages.STDERR_STREAM_SUMMARY_HEADER. getText(inName)); return System.err; }
lastException = null; interrupted.set(false); Messages.STARTED.debug(this, threadDescriptor); while(keepAlive.get()) { throw e; Messages.IGNORING_EXCEPTION.warn(this, e, threadDescriptor); Messages.INTERRUPTED.debug(this, threadDescriptor); } catch (Exception e) { lastException = e; Messages.SHUTTING_DOWN_FROM_ERROR.warn(this, e, threadDescriptor); keepAlive.set(false); running.set(false); Messages.STOPPED.debug(this, threadDescriptor);
Messages.LOG_JAR_LOADER_INIT.info(this, inAppInfoProvider); if(!inAppInfoProvider.getModulesDir().isDirectory()) { throw new FileNotFoundException(Messages.JAR_DIR_DOES_NOT_EXIST.getText(inAppInfoProvider.getModulesDir().getAbsolutePath())); if(!mJarDir.isDirectory()) { throw new FileNotFoundException(Messages.JAR_DIR_DOES_NOT_EXIST. getText(mJarDir.getAbsolutePath())); "conf"); //$NON-NLS-1$ if(!jarConfDir.isDirectory()) { throw new FileNotFoundException(Messages.JAR_DIR_DOES_NOT_EXIST.getText(jarConfDir.getAbsolutePath()));
int parseErrors = parseCommands(args[0]); if(parseErrors > 0) { Messages.LOG_COMMAND_PARSE_ERRORS.error(StrategyAgent.class, parseErrors); throw new IllegalArgumentException(Messages.LOG_COMMAND_PARSE_ERRORS.getText(parseErrors)); Messages.LOG_ERROR_CONFIGURE_AGENT.error(StrategyAgent.class, getMessage(e)); Messages.LOG_ERROR_CONFIGURE_AGENT.debug(StrategyAgent.class, e, getMessage(e)); init(); } catch (Exception e) { Messages.LOG_ERROR_INITIALIZING_AGENT.error(StrategyAgent.class, getMessage(e)); Messages.LOG_ERROR_INITIALIZING_AGENT.debug(StrategyAgent.class, e, getMessage(e));
} catch (InvalidMessage e) { Messages.ERROR_JMS_MESSAGE_CONVERSION.error(this, e.getMessage()); throw new MessageConversionException(Messages.ERROR_JMS_MESSAGE_CONVERSION.getText(e.getMessage()), e); Messages.ERROR_JMS_MESSAGE_CONVERSION.error(this, ex.getMessage()); throw new MessageConversionException(Messages.ERROR_JMS_MESSAGE_CONVERSION.getText(ex.getMessage()), ex);
/** * Unregisters the {@link ThreadedMetric} management interface from the * supplied bean server. * * @param inServer the mbean server to unregister the management interface * from. * * * @see MBeanServer#unregisterMBean(javax.management.ObjectName) */ public static void unregisterMgmtInterface(MBeanServer inServer) throws InstanceNotFoundException, MBeanRegistrationException { inServer.unregisterMBean(DEFAULT_NAME); Messages.LOG_UNREGISTERED_MXBEAN.info(JmxUtils.class, DEFAULT_NAME); }
private void init(Properties props) { Map<String, Exchange> map = new HashMap<String, Exchange>(); for (Object o : props.keySet()) { String key = (String) o; String marketIdentifierCode = (String) props.get(key); Exchange exch = Exchanges.getExchange(marketIdentifierCode); if (exch == null) { Messages.ERROR_EXCHANGE_DNE.error(this, marketIdentifierCode); } else { map.put(key, exch); } } init(map); }
Capability requiredCapability = necessaryCapabilities.get(atom.getContent()); if(requiredCapability == null) { org.marketcetera.marketdata.core.Messages.UNKNOWN_MARKETDATA_CONTENT.error(this, atom.getContent()); throw new UnsupportedOperationException(org.marketcetera.marketdata.core.Messages.UNKNOWN_MARKETDATA_CONTENT.getText(atom.getContent()));
@Override protected void addURL(URL url) { super.addURL(url); //Overridden to be able to log Messages.LOG_JAR_LOADER_ADD_URL.info(this, url); }
@Override public void cancel(DataFlowID inFlowID, RequestID inRequestID) { ReportListener listener = mRequestTable.remove(inRequestID); try { getClient().removeReportListener(listener); } catch (ClientInitException e) { Messages.LOG_CLIENT_NOT_INIT_CANCEL_REQUEST.error(this, e, inRequestID.toString()); } }
/** * Creates an instance. * * @param inStream the input stream that contains the property * key value pairs. If null, the configurator return null values * for all property names. */ public PropertyFileConfigurator(InputStream inStream) { mProperties = new Properties(); if(inStream == null) { return; } try { try { mProperties.load(inStream); } finally { inStream.close(); } } catch (IOException e) { Messages.LOG_ERR_LOADING_PROPERTIES.warn(this, e, inStream); } }
@Override public void setAttribute(Attribute attribute) throws AttributeNotFoundException { //Attributes are not writable throw new AttributeNotFoundException( Messages.MXBEAN_ATTRIB_NOT_WRITABLE.getText( attribute.getName())); }
/** * Registers the {@link ThreadedMetric} management interface with * the supplied bean server. * * @param inServer the mbean server to register the management interface to. * * @see MBeanServer#registerMBean(Object, javax.management.ObjectName) */ public static void registerMgmtInterface(MBeanServer inServer) throws MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException { inServer.registerMBean(new ThreadedMetricBeanImpl(), DEFAULT_NAME); Messages.LOG_REGISTERED_MXBEAN.info(JmxUtils.class, DEFAULT_NAME); }
/** * Gets the parameter associated with the given name. * * @param inName a <code>String</code> value containing the key of a parameter key/value value * @return a <code>String</code> value or null if no parameter is associated with the given name */ protected final String getParameter(String inName) { Properties parameters = strategy.getParameters(); if(parameters == null) { NO_PARAMETERS.warn(AbstractRunningStrategy.class, strategy); return null; } return parameters.getProperty(inName); } /**
/** * Get the FIX version value associated with the given string representation. * * @param inVersion a <code>String</code> value * @return a <code>FIXVersion</code> value * @throws IllegalArgumentException if the FIX version of the given message is unsupported */ public static FIXVersion getFIXVersion(String inVersion) { FIXVersion fixVersion = versionMap.get(inVersion); if(fixVersion == null) { throw new IllegalArgumentException(Messages.FIX_VERSION_UNSUPPORTED.getText(inVersion)); } return fixVersion; } /**