java - Is IntentService an implementation of Command Pattern? -


according wikipedia:

"in object-oriented programming, command pattern behavioral design pattern in object used encapsulate information needed perform action or trigger event @ later time. information includes method name, object owns method , values method parameters."

and according professor schmidt's text, command has:

  • time-independent execution of application logic. encapsulation of application logic allows queue , execute @ different point in time.
  • context-independent execution of application logic. separation between application logic , context allows execute application in separate contexts, such in different thread or using different state.
  • exchangeability of application logic. separation between application logic , context allows easier exchange application logic.

if encapsulate information intent, onhandleintent works abstract method command executor, described @ command processor pattern text.

thus, instead of explicitly implement executor in order invoke command, delegate command execution operating system.

so questions are:

  1. is intentservice framework implementation command pattern?
  2. in affirmative case, why android mvp implementations explicitly implements own executor instead of using 1 provided framework?


Comments