約 30 の操作を含む Web サービスを Java で開発しました。各操作には、2 ~ 3 行を除いてまったく同じコードがあります。以下はコードのスケッチです
public Response operation1(String arg1, String arg2)
{
   initialze(); // this line will be different for each operation with different arguments
   authorizeSession();
   Response res;
   if (authorized)
   {
       try 
       {
          Object result = callMethod1(arg1, arg2); // This line is different for each operation
          res = Response.ok(result).build();
       }
       catch( MultipleExceptions ex)
       {
          res = handleExceptions();
       }
       finally
       {
           logInDatabase();
       }
   }
   return res;
}
各操作で同じコードを記述する必要がないようにするには、どのアプローチに従う必要がありますか?
- リフレクションを使用する必要がありますか?
 - アスペクト指向プログラミングについて聞いたことがありますが、ここで AOP を使用できますか?
 - 従来の switch case ステートメントと、操作に基づいて呼び出すメソッドを決定するメソッドを使用する必要がありますか?