Refine search
/** * Callback invoked when an IO exception occurs. By default, it logs the * exception at the {@link Level#WARNING} level. * * @param ioe * The exception caught. */ protected void onError(IOException ioe) { Context.getCurrentLogger().log(Level.WARNING, "", ioe); }
/** * Callback invoked when an IO exception occurs. By default, it logs the * exception at the {@link Level#WARNING} level. * * @param ioe * The exception caught. */ protected void onError(IOException ioe) { Context.getCurrentLogger().log(Level.WARNING, "", ioe); }
/** * Resume interest in new listener notifications. This should be called * after a {@link #suspend()} call. */ public void resume() { if (Context.getCurrentLogger().isLoggable(Level.FINER)) { Context.getCurrentLogger().log(Level.FINER, "Resuming previous NIO interest"); } setInterestOperations(this.previousInterest); }
/** * Resume interest in new listener notifications. This should be called * after a {@link #suspend()} call. */ public void resume() { if (Context.getCurrentLogger().isLoggable(Level.FINER)) { Context.getCurrentLogger().log(Level.FINER, "Resuming previous NIO interest"); } setInterestOperations(this.previousInterest); }
/** * Creates a new entry. * * @param name * The name of the entry. * @param value * The value of the entry. * @return A new entry. */ public T createEntry(String name, String value) { try { return this.entryClass.getConstructor(String.class, String.class) .newInstance(name, value); } catch (Exception e) { Context.getCurrentLogger().log(Level.WARNING, "Unable to create a series entry", e); return null; } }
public void run() { try { representation.write(os); os.flush(); } catch (IOException ioe) { Context.getCurrentLogger().log(Level.WARNING, "Error while writing to the piped input stream.", ioe); } finally { try { os.close(); } catch (IOException ioe2) { Context.getCurrentLogger().log(Level.WARNING, "Error while closing the pipe.", ioe2); } } } };
/** * Set a schema representation to be compiled and used when parsing and * validating this type of XML representations. * * @param schemaRepresentation * The schema representation to set. */ public void setSchema(Representation schemaRepresentation) { try { this.schema = getSchema(schemaRepresentation); } catch (Exception e) { Context.getCurrentLogger().log(Level.WARNING, "Unable to compile the schema representation", e); } }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.reader != null) { try { this.reader.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.reader = null; } super.release(); }
/** * Set a schema representation to be compiled and used when parsing and * validating this type of XML representations. * * @param schemaRepresentation * The schema representation to set. */ public void setSchema(Representation schemaRepresentation) { try { this.schema = getSchema(schemaRepresentation); } catch (Exception e) { Context.getCurrentLogger().log(Level.WARNING, "Unable to compile the schema representation", e); } }
public void onSelected( SelectionRegistration registration) throws IOException { if (Context.getCurrentLogger() .isLoggable(Level.FINER)) { Context.getCurrentLogger() .log(Level.FINER, "NbChannelInputStream selected"); } // Stop listening at this point selectionRegistration.suspend(); // Unblock the user thread selectionRegistration.unblock(); } });
/** * Closes and releases the input stream. */ @Override public void release() { if (this.reader != null) { try { this.reader.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.reader = null; } super.release(); }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.stream != null) { try { this.stream.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.stream = null; } super.release(); }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.stream != null) { try { this.stream.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.stream = null; } super.release(); }
/** * Closes and releases the readable channel. */ @Override public void release() { if (this.channel != null) { try { this.channel.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.channel = null; } super.release(); }
/** * Closes and releases the input stream. */ @Override public void release() { if (this.stream != null) { try { this.stream.close(); } catch (IOException e) { Context.getCurrentLogger().log(Level.WARNING, "Error while releasing the representation.", e); } this.stream = null; } super.release(); }
public void run() { try { final OutputStream os = pipe.getOutputStream(); representation.write(os); os.write(-1); os.close(); } catch (IOException ioe) { Context.getCurrentLogger().log(Level.FINE, "Error while writing to the piped input stream.", ioe); } } });
@Override public void error(SAXParseException x) throws SAXException { if (loggable) { final String msg = "[ERROR] - Unexpected exception while parsing " + "an instance of PUBLIC [" + x.getPublicId() + "], SYSTEM [" + x.getSystemId() + "] - line #" + x.getLineNumber() + ", column #" + x.getColumnNumber(); if (debug) { Context.getCurrentLogger().log(Level.CONFIG, msg, x); } else { logger.config(msg + ": " + x.getLocalizedMessage()); } } }
@Override public void fatalError(SAXParseException x) throws SAXException { if (loggable) { final String msg = "[FATAL] - Unexpected exception while parsing " + "an instance of PUBLIC [" + x.getPublicId() + "], SYSTEM [" + x.getSystemId() + "] - line #" + x.getLineNumber() + ", column #" + x.getColumnNumber(); if (debug) { Context.getCurrentLogger().log(Level.CONFIG, msg, x); } else { logger.config(msg + ": " + x.getLocalizedMessage()); } } }
public void run() { try { final WritableByteChannel wbc = pipe.sink(); representation.write(wbc); wbc.close(); } catch (IOException ioe) { Context.getCurrentLogger().log(Level.FINE, "Error while writing to the piped channel.", ioe); } } });
@Override public void warning(SAXParseException x) throws SAXException { if (loggable) { final String msg = "[WARN] - Unexpected exception while parsing " + "an instance of PUBLIC [" + x.getPublicId() + "], SYSTEM [" + x.getSystemId() + "] - line #" + x.getLineNumber() + ", column #" + x.getColumnNumber(); if (debug) { Context.getCurrentLogger().log(Level.CONFIG, msg, x); } else { logger.config(msg + ": " + x.getLocalizedMessage()); } } } }