View Javadoc
1   /*  This file is part of the aspect  project.
2    This program is free software; you can redistribute it and/or
3    modify it under the terms of the GNU Lesser General Public License
4    as published by the Free Software Foundation; version 2.1
5    of the License.
6    This program is distributed in the hope that it will be useful,
7    but WITHOUT ANY WARRANTY; without even the implied warranty of
8    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9    GNU Lesser General Public License for more details.
10   You should have received a copy of the GNU Lesser General Public License
11   along with this program; if not, write to the Free Software
12   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
13  
14   Copyright 2007-2014 Semochkin Vitaliy Evgenevich aka Yilativs
15    
16   */
17  package net.sf.aspect4log.text;
18  
19  import net.sf.aspect4log.Log;
20  
21  /**
22   * This interfaces defines methods you need to implement in case you would like to use your own implementations of{@link MessageBuilder}
23   *
24   * E.g. you might want to add some extra information to each log message, while the information is taken from your system. 
25   * 
26   * Nobody, including the authors ever faced the need for another implementation, yet if you create one feel free to share with us why you did it. 
27   *  
28   * @author yilativs
29   *
30   */
31  public interface MessageBuilderFactory {
32  
33  	MessageBuilder createEnterMessageBuilder(String methodName, Log log, Object[] args);
34  
35  	MessageBuilder createSuccessfulReturnMessageBuilder(String methodName, Log log, Object[] args, boolean returnsNothing,Object result);
36  
37  	MessageBuilder createExceptionReturnMessageBuilder(String methodName, Log log, Object[] args, Throwable throwable,String exceptionExitTemplate);
38  	
39  	MessageBuilder createMdcTemplate(Log log, Object[] args);
40  	
41  	String buildIdent();
42  
43  }