/* (non-Javadoc) * @see org.plj.chanells.febe.msg.MessageFactory#sendMessage(org.pgj.messages.Message, org.plj.chanells.febe.core.PGStream) */ public void sendMessage(Message msg, PGStream stream) throws IOException, MappingException, CommunicationException { SQL sql = (SQL) msg; String clname = msg.getClass().getName(); AbstractSQLMessageFactory msgf = (AbstractSQLMessageFactory) map.get(clname); if (msgf == null) { logger.fatalError("sender method not implemented for " + clname); throw new CommunicationException("sender method not implemented for " + clname); } stream.SendInteger(msgf.getSQLType(), 4); msgf.sendMessage(msg, stream); }
public void processEvent(Event event) { String msg = EventFormatter.format(event); EventSeverity severity = event.getSeverity(); if (severity == EventSeverity.INFO) { // logger.info(filename + ": " + msg); } else if (severity == EventSeverity.WARN) { // logger.warn(filename + ": " + msg); } else if (severity == EventSeverity.ERROR) { logger.error(filename + ": " + msg); } else if (severity == EventSeverity.FATAL) { logger.fatalError(filename + ": " + msg); } else { assert false; } }
public void fatalError(String message, Throwable thr) { realLogger.fatalError(message, thr); throwException(FATAL_VALUE, message); }