Information Technology Reference
In-Depth Information
Base Map
Base Map
Reservation
Reservation
start
success
start
success
makeReservation
makeReservation
[reservationOK]
[reservationOK]
[reservationFailed]
[reservationFailed]
n
fail
fail
n
Authorization Aspect
o
p
Security
start
e1
s1
checkAuthorization
[success]
Authorization Aspect
Security
success
[fail]
accessReservation
start
A
d
v
i
c
e
checkAuthorization
[success]
P
fail
success
[fail]
b) Step 1
Base Map
Reservation
fail
P
o
i
n
t
c
u
t
start
success
makeReservation
[reservationOK]
Reservation
[reservationFailed]
*
fail
o
n
Authorization Aspect
Security
start
e1
a) Initial Mappings and Plug-in Bindings
checkAuthorization
[success]
[fail]
fail
c) Step 2
Base Map
Reservation
Authorization
A
start
success
makeReservation [reservationOK]
[reservationFailed]
fail
Authorization Aspect
Security
start
e1
checkAuthorization
[success]
[fail]
fail
d) Step 3
Fig. 18. Composition of aspect and base map
For an example of the composition algorithm, recall the authorization aspect
from Fig. 14 and the mappings from Fig. 16 (repeated in Fig. 18a). Note the
joinpoint (the responsibility in the base map). The right side of Fig. 18 shows
the three steps involved in composing the system.
Step 1 removes the pointcut stub from the advice map while retaining the
mappings to the base map. The removal of the pointcut requires new start and
end points to be inserted into the advice map ( s1 and e1 in Fig. 18b). Empty
Search WWH ::




Custom Search