this.setName("AsyncFileHandlerWriter-"+System.identityHashCode(this));
}
+ @Override
public void run() {
while (run) {
try {
*
* @param logger The logger to be added
*/
+ @Override
public synchronized boolean addLogger(final Logger logger) {
final String loggerName = logger.getName();
*
* @param name The name of the logger to retrieve
*/
+ @Override
public synchronized Logger getLogger(final String name) {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
* Get an enumeration of the logger names currently defined in the
* classloader local configuration.
*/
+ @Override
public synchronized Enumeration<String> getLoggerNames() {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
*
* @param name The property name
*/
+ @Override
public String getProperty(String name) {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
}
+ @Override
public void readConfiguration()
throws IOException, SecurityException {
}
+ @Override
public void readConfiguration(InputStream is)
throws IOException, SecurityException {
*
* @param record description of the log event
*/
+ @Override
public void publish(LogRecord record) {
if (!isLoggable(record)) {
/**
* Close the currently open log file (if any).
*/
+ @Override
public void close() {
closeWriter();
}
/**
* Flush the writer.
*/
+ @Override
public void flush() {
try {
public static final int LOG_LEVEL_ERROR = 1000;
public static final int LOG_LEVEL_FATAL = 1000;
+ @Override
public String format(LogRecord record) {
Throwable t=record.getThrown();
int level=record.getLevel().intValue();
/**
* Return the underlying cause of this exception (if any).
*/
+ @Override
public Throwable getCause() {
return (this.cause);
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("HandlerRef[");
// --------------------------------------------------------- Object Methods
+ @Override
public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof NamingEntry)) {
return name.equals(((NamingEntry) obj).name);
}
+ @Override
public int hashCode() {
return name.hashCode();
}
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ResourceRef[");
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
/**
* Return a String rendering of this object.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("ServiceRef[");
* Retrieves the class name of the factory of the object to which this
* reference refers.
*/
+ @Override
public String getFactoryClassName() {
String factory = super.getFactoryClassName();
if (factory != null) {
}
+ @Override
public String toString() {
return ("Cache entry: " + name + "\n"
+ "Exists: " + exists + "\n"
*
* @throws IOException Object not found
*/
+ @Override
public void connect()
throws IOException {
/**
* Return the content length value.
*/
+ @Override
public int getContentLength() {
return getHeaderFieldInt(ResourceAttributes.CONTENT_LENGTH, -1);
}
/**
* Return the content type value.
*/
+ @Override
public String getContentType() {
return getHeaderField(ResourceAttributes.CONTENT_TYPE);
}
/**
* Return the last modified date.
*/
+ @Override
public long getDate() {
return date;
}
/**
* Return the last modified date.
*/
+ @Override
public long getLastModified() {
if (!connected) {
/**
* Returns an unmodifiable Map of the header fields.
*/
+ @Override
public Map<String,List<String>> getHeaderFields() {
if (!connected) {
/**
* Returns the name of the specified header field.
*/
+ @Override
public String getHeaderField(String name) {
if (!connected) {
/**
* Get object content.
*/
+ @Override
public Object getContent()
throws IOException {
/**
* Get object content.
*/
+ @Override
public Object getContent(Class[] classes)
throws IOException {
/**
* Get input stream.
*/
+ @Override
public InputStream getInputStream()
throws IOException {
/**
* Get the Permission for this URL
*/
+ @Override
public Permission getPermission() {
return permission;
* Opens a connection to the object referenced by the <code>URL</code>
* argument.
*/
+ @Override
protected URLConnection openConnection(URL u)
throws IOException {
DirContext currentContext = this.context;
/**
* Override as part of the fix for 36534, to ensure toString is correct.
*/
+ @Override
protected String toExternalForm(URL u) {
// pre-compute length of StringBuilder
int len = u.getProtocol().length() + 1;
* @exception IllegalArgumentException if this would create a
* malformed URL
*/
+ @Override
public void setDocBase(String docBase) {
// Validate the format of the proposed document root
/**
* Release any resources allocated for this directory context.
*/
+ @Override
public void release() {
super.release();
}
*
* @param path The path to the desired resource
*/
+ @Override
protected String doGetRealPath(String path) {
File file = new File(getDocBase(), path);
return file.getAbsolutePath();
* @return the object bound to name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
protected Object doLookup(String name)
throws NamingException {
Object result = null;
* exist
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void unbind(String name)
throws NamingException {
* @exception NameAlreadyBoundException if newName is already bound
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rename(String oldName, String newName)
throws NamingException {
* this context. Each element of the enumeration is of type NameClassPair.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<NameClassPair> list(String name)
throws NamingException {
* Each element of the enumeration is of type Binding.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
* @exception NotContextException if the name is bound but does not name
* a context, or does not name a context of the appropriate type
*/
+ @Override
public void destroySubcontext(String name)
throws NamingException {
unbind(name);
* (if any).
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookupLink(String name)
throws NamingException {
// Note : Links are not supported
* not have the notion of a full name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public String getNameInNamespace()
throws NamingException {
return docBase;
* indicates that none should be retrieved
* @exception NamingException if a naming exception is encountered
*/
+ @Override
protected Attributes doGetAttributes(String name, String[] attrIds)
throws NamingException {
* completed successfully
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void modifyAttributes(String name, int mod_op, Attributes attrs)
throws NamingException {
* completed successfully
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void modifyAttributes(String name, ModificationItem[] mods)
throws NamingException {
* of the binding are not supplied
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void bind(String name, Object obj, Attributes attrs)
throws NamingException {
* of the binding are not supplied
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rebind(String name, Object obj, Attributes attrs)
throws NamingException {
* the mandatory attributes required for creation
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext createSubcontext(String name, Attributes attrs)
throws NamingException {
* @exception OperationNotSupportedException if schema not supported
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext getSchema(String name)
throws NamingException {
throw new OperationNotSupportedException();
* @exception OperationNotSupportedException if schema not supported
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext getSchemaClassDefinition(String name)
throws NamingException {
throw new OperationNotSupportedException();
* context named by name.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name,
Attributes matchingAttributes, String[] attributesToReturn)
throws NamingException {
* context named by name.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name,
Attributes matchingAttributes) throws NamingException {
return null;
* contain invalid settings
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name, String filter,
SearchControls cons)
throws NamingException {
* represents an invalid search filter
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name,
String filterExpr, Object[] filterArgs, SearchControls cons)
throws NamingException {
*
* @return InputStream
*/
+ @Override
public InputStream streamContent()
throws IOException {
if (binaryContent == null) {
/**
* Is collection.
*/
+ @Override
public boolean isCollection() {
if (!accessed) {
collection = file.isDirectory();
*
* @return content length value
*/
+ @Override
public long getContentLength() {
if (contentLength != -1L)
return contentLength;
*
* @return creation time value
*/
+ @Override
public long getCreation() {
if (creation != -1L)
return creation;
*
* @return Creation date value
*/
+ @Override
public Date getCreationDate() {
if (creation == -1L) {
creation = getCreation();
*
* @return lastModified time value
*/
+ @Override
public long getLastModified() {
if (lastModified != -1L)
return lastModified;
*
* @return LastModified date value
*/
+ @Override
public Date getLastModifiedDate() {
if (lastModified == -1L) {
lastModified = getLastModified();
*
* @return Name value
*/
+ @Override
public String getName() {
if (name == null)
name = file.getName();
*
* @return String resource type
*/
+ @Override
public String getResourceType() {
if (!accessed) {
collection = file.isDirectory();
*
* @return String the file's canonical path
*/
+ @Override
public String getCanonicalPath() {
if (canonicalPath == null) {
try {
public class ImmutableNameNotFoundException
extends NameNotFoundException {
+ @Override
public void appendRemainingComponent(String name) {}
+ @Override
public void appendRemainingName(Name name) {}
+ @Override
public void setRemainingName(Name name) {}
public void setResolverName(Name name) {}
+ @Override
public void setRootCause(Throwable e) {}
}
/**
* Clone the attributes object (WARNING: fake cloning).
*/
+ @Override
public Object clone() {
return this;
}
* @exception IllegalArgumentException if this would create a
* malformed URL
*/
+ @Override
public void setDocBase(String docBase) {
// Validate the format of the proposed document root
/**
* Release any resources allocated for this directory context.
*/
+ @Override
public void release() {
entries = null;
*
* @param path The path to the desired resource
*/
+ @Override
protected String doGetRealPath(String path) {
return null;
}
* @return the object bound to name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
protected Object doLookup(String name)
throws NamingException {
return lookup(new CompositeName(name));
* @return the object bound to name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookup(Name name)
throws NamingException {
if (name.isEmpty())
* exist
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void unbind(String name)
throws NamingException {
throw new OperationNotSupportedException();
* @exception NameAlreadyBoundException if newName is already bound
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rename(String oldName, String newName)
throws NamingException {
throw new OperationNotSupportedException();
* this context. Each element of the enumeration is of type NameClassPair.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<NameClassPair> list(String name)
throws NamingException {
return list(new CompositeName(name));
* this context. Each element of the enumeration is of type NameClassPair.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<NameClassPair> list(Name name)
throws NamingException {
if (name.isEmpty())
* Each element of the enumeration is of type Binding.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<Binding> listBindings(String name)
throws NamingException {
return listBindings(new CompositeName(name));
* Each element of the enumeration is of type Binding.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<Binding> listBindings(Name name)
throws NamingException {
if (name.isEmpty())
* @exception NotContextException if the name is bound but does not name
* a context, or does not name a context of the appropriate type
*/
+ @Override
public void destroySubcontext(String name)
throws NamingException {
throw new OperationNotSupportedException();
* (if any).
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Object lookupLink(String name)
throws NamingException {
// Note : Links are not supported
* not have the notion of a full name
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public String getNameInNamespace()
throws NamingException {
return docBase;
* indicates that none should be retrieved
* @exception NamingException if a naming exception is encountered
*/
+ @Override
protected Attributes doGetAttributes(String name, String[] attrIds)
throws NamingException {
return getAttributes(new CompositeName(name), attrIds);
* @param name the name of the object from which to retrieve attributes
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public Attributes getAttributes(Name name, String[] attrIds)
throws NamingException {
* completed successfully
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void modifyAttributes(String name, int mod_op, Attributes attrs)
throws NamingException {
throw new OperationNotSupportedException();
* completed successfully
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void modifyAttributes(String name, ModificationItem[] mods)
throws NamingException {
throw new OperationNotSupportedException();
* of the binding are not supplied
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void bind(String name, Object obj, Attributes attrs)
throws NamingException {
throw new OperationNotSupportedException();
* of the binding are not supplied
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public void rebind(String name, Object obj, Attributes attrs)
throws NamingException {
throw new OperationNotSupportedException();
* the mandatory attributes required for creation
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext createSubcontext(String name, Attributes attrs)
throws NamingException {
throw new OperationNotSupportedException();
* @exception OperationNotSupportedException if schema not supported
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext getSchema(String name)
throws NamingException {
throw new OperationNotSupportedException();
* @exception OperationNotSupportedException if schema not supported
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public DirContext getSchemaClassDefinition(String name)
throws NamingException {
throw new OperationNotSupportedException();
* context named by name.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name,
Attributes matchingAttributes, String[] attributesToReturn)
throws NamingException {
* context named by name.
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name,
Attributes matchingAttributes) throws NamingException {
throw new OperationNotSupportedException();
* contain invalid settings
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name, String filter,
SearchControls cons)
throws NamingException {
* represents an invalid search filter
* @exception NamingException if a naming exception is encountered
*/
+ @Override
public NamingEnumeration<SearchResult> search(String name, String filterExpr,
Object[] filterArgs, SearchControls cons)
throws NamingException {
*
* @return InputStream
*/
+ @Override
public InputStream streamContent()
throws IOException {
try {