|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
org.norther.tammi.core.base.LogException
org.norther.tammi.spray.filter.DefaultExceptionFilter
public class DefaultExceptionFilter
A default implementation of ExceptionFilter.
Note that negative status code prevents logging.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.LogException |
|---|
DEFAULT, ERROR, FATAL, INFO, NONE, WARN, WARNING |
| Constructor Summary | |
|---|---|
DefaultExceptionFilter(int code)
Constructs an exception with a code. |
|
DefaultExceptionFilter(int code,
String argument)
Constructs an exception with a code and argument. |
|
DefaultExceptionFilter(int code,
String argument,
Throwable cause)
Constructs an exception with a code, argument and cause. |
|
DefaultExceptionFilter(int code,
Throwable cause)
Constructs an exception with a code and cause. |
|
| Method Summary | |
|---|---|
void |
destroy()
|
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
|
MBeanServer |
getMBeanServer()
Gets the MBean server. |
protected CharSequence |
getMessage(ServletRequest request,
ServletResponse response,
FilterChain chain)
Returns the message to produce. |
ObjectName |
getObjectName()
Gets the object name. |
int |
getStatusCode()
Gets the status code. |
void |
init(FilterConfig config)
|
boolean |
isRegistered()
Checks whether registered. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
premanaged(MBeanDelegate adapter)
This method is called when the implementing adaptee is trying to be managed either during pre-registration of the corresponding adapter MBean or just before it is explicitly added to the adapter MBean during run-time. |
protected void |
prepareCommit(ServletRequest request,
ServletResponse response,
FilterChain chain)
A callback for subclasses to modify the response before committing. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
| Methods inherited from class org.norther.tammi.core.base.LogException |
|---|
getArgument, getLevel, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getMessageLog, getTime, setLevel |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.spray.filter.ExceptionFilter |
|---|
getLocalizedMessage, getMessage |
| Constructor Detail |
|---|
public DefaultExceptionFilter(int code)
code - the status code.
public DefaultExceptionFilter(int code,
String argument)
code - the status code.argument - the argument string.
public DefaultExceptionFilter(int code,
Throwable cause)
code - the status code.cause - the cause throwable.
public DefaultExceptionFilter(int code,
String argument,
Throwable cause)
code - the status code.argument - the argument string.cause - the cause throwable.| Method Detail |
|---|
public void premanaged(MBeanDelegate adapter)
throws Exception
Manageable
premanaged in interface Manageableadapter - the managing adapter.
Exception - if the adaptee refused to be managed.public void postmanaged()
Manageable
postmanaged in interface Manageable
public void unmanaged()
throws Exception
Manageable
unmanaged in interface ManageableException - if the adaptee refused to be unmanaged.public int getStatusCode()
ExceptionFilter
getStatusCode in interface ExceptionFilter
public void init(FilterConfig config)
throws ServletException
init in interface FilterServletExceptionpublic void destroy()
destroy in interface Filter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws ServletException,
IOException
doFilter in interface FilterServletException
IOExceptionpublic ObjectName getObjectName()
public boolean isRegistered()
public MBeanServer getMBeanServer()
protected CharSequence getMessage(ServletRequest request,
ServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
protected void prepareCommit(ServletRequest request,
ServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||