net.dpml.transit.tools
Class AntAdapter

java.lang.Object
  extended by net.dpml.transit.tools.AntAdapter
All Implemented Interfaces:
Adapter, Logger

public class AntAdapter
extends Object
implements Adapter

A ant montor for download messages.

Version:
1.0.3
Author:
Digital Product Meta Library

Constructor Summary
AntAdapter(Task task)
          Creation of a new ant logging adapter.
 
Method Summary
 void debug(String message)
          Record a debug level message.
 void error(String message)
          Record a error level message.
 void error(String message, Throwable e)
          Record a error level message.
 Logger getChildLogger(String category)
          Create a new subsidiary logging channel.
 void info(String message)
          Record a informative message.
 boolean isDebugEnabled()
          Return TRUE is debug level logging is enabled.
 boolean isErrorEnabled()
          Return TRUE is error level logging is enabled.
 boolean isInfoEnabled()
          Return TRUE is info level logging is enabled.
 boolean isTraceEnabled()
          Return TRUE is trace level logging is enabled.
 boolean isWarnEnabled()
          Return TRUE is warn level logging is enabled.
 void notify(URL resource, int total, int count)
          Hnadle download notification.
 void trace(String message)
          Record a trace level message.
 void warn(String message)
          Record a warning message.
 void warn(String message, Throwable cause)
          Record a warning message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntAdapter

public AntAdapter(Task task)
Creation of a new ant logging adapter.

Parameters:
task - the task establishing the adapter
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Return TRUE is trace level logging is enabled.

Specified by:
isTraceEnabled in interface Logger
Returns:
the enabled state of trace logging

isDebugEnabled

public boolean isDebugEnabled()
Return TRUE is debug level logging is enabled.

Specified by:
isDebugEnabled in interface Logger
Returns:
the enabled state of debug logging

isInfoEnabled

public boolean isInfoEnabled()
Return TRUE is info level logging is enabled.

Specified by:
isInfoEnabled in interface Logger
Returns:
the enabled state of info logging

isWarnEnabled

public boolean isWarnEnabled()
Return TRUE is warn level logging is enabled.

Specified by:
isWarnEnabled in interface Logger
Returns:
the enabled state of warn logging

isErrorEnabled

public boolean isErrorEnabled()
Return TRUE is error level logging is enabled.

Specified by:
isErrorEnabled in interface Logger
Returns:
the enabled state of error logging

debug

public void debug(String message)
Record a debug level message.

Specified by:
debug in interface Logger
Parameters:
message - the debug message to record

trace

public void trace(String message)
Record a trace level message.

Specified by:
trace in interface Logger
Parameters:
message - the trace message to record

info

public void info(String message)
Record a informative message.

Specified by:
info in interface Logger
Parameters:
message - the info message to record

warn

public void warn(String message)
Record a warning message.

Specified by:
warn in interface Logger
Parameters:
message - the warning message to record

warn

public void warn(String message,
                 Throwable cause)
Record a warning message.

Specified by:
warn in interface Logger
Parameters:
message - the warning message to record
cause - the causal exception

error

public void error(String message)
Record a error level message.

Specified by:
error in interface Logger
Parameters:
message - the error message to record

error

public void error(String message,
                  Throwable e)
Record a error level message.

Specified by:
error in interface Logger
Parameters:
message - the error message to record
e - the error

getChildLogger

public Logger getChildLogger(String category)
Create a new subsidiary logging channel.

Specified by:
getChildLogger in interface Logger
Parameters:
category - the channel name relative to this logging channel
Returns:
the new logging channel

notify

public void notify(URL resource,
                   int total,
                   int count)
Hnadle download notification.

Specified by:
notify in interface Adapter
Parameters:
resource - the resource under attention
total - the estimated download size
count - the progress towards expected