|
|
@@ -36,20 +36,24 @@ public abstract class Presenter<M extends Model, V extends IView> implements INe
|
|
|
this.view = view;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * start
|
|
|
- */
|
|
|
- public abstract void start();
|
|
|
-
|
|
|
/**
|
|
|
* dispose
|
|
|
*/
|
|
|
public final void dispose() {
|
|
|
model.dispose();
|
|
|
|
|
|
- dispose(0);
|
|
|
+ onDispose();
|
|
|
}
|
|
|
- protected abstract void dispose(int nothing);
|
|
|
+
|
|
|
+ /***********************************
|
|
|
+ * abstract
|
|
|
+ ***********************************/
|
|
|
+ /**
|
|
|
+ * start
|
|
|
+ */
|
|
|
+ public abstract void start();
|
|
|
+
|
|
|
+ protected abstract void onDispose();
|
|
|
|
|
|
/**
|
|
|
* 장치 back key 눌렸을 경우 처리한다.
|
|
|
@@ -64,6 +68,7 @@ public abstract class Presenter<M extends Model, V extends IView> implements INe
|
|
|
* View 로 부터 전달된 이벤트를 처리한다.
|
|
|
* - 공통 처리가 필요한 이벤트를 처리한 뒤
|
|
|
* - 각 Presenter.performOnEvent(Event) 에서 세부 처리한다.
|
|
|
+ *
|
|
|
* @param event
|
|
|
*/
|
|
|
public void onEvent(Event event) {
|
|
|
@@ -72,11 +77,9 @@ public abstract class Presenter<M extends Model, V extends IView> implements INe
|
|
|
|
|
|
protected abstract void performOnEvent(Event event);
|
|
|
|
|
|
- /**
|
|
|
- * 뷰로 부터 전달된 커멘드를 실행한다.
|
|
|
- *
|
|
|
- * @param command Command
|
|
|
- */
|
|
|
+ /***********************************
|
|
|
+ * method
|
|
|
+ ***********************************/
|
|
|
void onCommand(Command command) {
|
|
|
this.command = command;
|
|
|
Log.w("APP# Presenter | onCommand", "| command: " + command.getClass().getSimpleName() + ", " + new Gson().toJson(command));
|