]> git.mxchange.org Git - jcore-utils.git/blob - src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java
Renamed method as this is no business method.
[jcore-utils.git] / src / org / mxchange / jcoreee / beans / BaseFrameworkBean.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcoreee.beans;
18
19 import javax.enterprise.context.Dependent;
20 import org.apache.logging.log4j.LogManager;
21 import org.apache.logging.log4j.Logger;
22
23 /**
24  * A general bean class. Do not put things in here that are not serializable.
25  * The logger is currently not serializable, so you will get error messages.
26  *
27  * @author Roland Haeder
28  */
29 @Dependent
30 public abstract class BaseFrameworkBean implements FrameworkBean {
31
32         /**
33          * Serial number
34          */
35         private static final long serialVersionUID = 83258139481372814L;
36
37         /**
38          * Class' logger
39          */
40         private final Logger LOG;
41
42         /**
43          * Initializer
44          */
45         {
46                 // Get logger
47                 this.LOG = LogManager.getLogger(this);
48         }
49
50         /**
51          * Protected constructor, please don't add init() call here.
52          */
53         protected BaseFrameworkBean () {
54         }
55
56         /**
57          * Getter for logger
58          *
59          * @return Logger
60          */
61         protected Logger getLogger () {
62                 return this.LOG;
63         }
64
65         /**
66          * Super initialization method. If you overwrite this method, please call it before (!) your own initialization.
67          *
68          * @throws RuntimeException If something unexpected happens
69          */
70         protected void localInit () throws RuntimeException {
71                 // Empty for now
72         }
73 }