Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Kiwi |
|
| 1.3333333333333333;1.333 |
1 | /* | |
2 | * $Id: Kiwi.java 7963 2007-08-21 08:53:15Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.tck.testmodels.fruit; | |
12 | ||
13 | import org.mule.umo.UMOEventContext; | |
14 | ||
15 | /** | |
16 | * A test object not implementing Callable, but having a matching method accepting | |
17 | * UMOEventContext. | |
18 | */ | |
19 | 2 | public class Kiwi implements Fruit |
20 | { | |
21 | /** | |
22 | * Serial version | |
23 | */ | |
24 | private static final long serialVersionUID = -1468423665948468954L; | |
25 | ||
26 | private boolean bitten; | |
27 | ||
28 | public void handle(UMOEventContext eventContext) throws Exception | |
29 | { | |
30 | 0 | final Object payload = eventContext.getTransformedMessage(); |
31 | 0 | if (payload instanceof FruitLover) |
32 | { | |
33 | 0 | this.bite(); |
34 | } | |
35 | 0 | } |
36 | ||
37 | public void bite() | |
38 | { | |
39 | 0 | this.bitten = true; |
40 | 0 | } |
41 | ||
42 | public boolean isBitten() | |
43 | { | |
44 | 0 | return this.bitten; |
45 | } | |
46 | } |