diff options
Diffstat (limited to 'subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java')
-rw-r--r-- | subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java new file mode 100644 index 00000000..99097f56 --- /dev/null +++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/mailbox/AdaptableMailbox.java | |||
@@ -0,0 +1,32 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2018, Tamas Szabo, Istvan Rath and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.viatra.runtime.rete.network.mailbox; | ||
10 | |||
11 | import tools.refinery.viatra.runtime.rete.network.communication.CommunicationTracker; | ||
12 | import tools.refinery.viatra.runtime.rete.network.communication.timely.TimelyMailboxProxy; | ||
13 | import tools.refinery.viatra.runtime.rete.network.mailbox.timeless.BehaviorChangingMailbox; | ||
14 | |||
15 | /** | ||
16 | * An adaptable mailbox can be wrapped by another mailbox to act in behalf of that. The significance of the adaptation | ||
17 | * is that the adaptee will notify the {@link CommunicationTracker} about updates by promoting the adapter itself. | ||
18 | * Adaptable mailboxes are used by the {@link BehaviorChangingMailbox}. | ||
19 | * | ||
20 | * Compare this with {@link TimelyMailboxProxy}. That one also wraps another mailbox in order to | ||
21 | * perform preprocessing on the messages sent to the original recipient. | ||
22 | * | ||
23 | * @author Tamas Szabo | ||
24 | * @since 2.0 | ||
25 | */ | ||
26 | public interface AdaptableMailbox extends Mailbox { | ||
27 | |||
28 | public Mailbox getAdapter(); | ||
29 | |||
30 | public void setAdapter(final Mailbox adapter); | ||
31 | |||
32 | } | ||