tweed.invocation
Class LoopbackInvoker
java.lang.Object
|
+--tweed.invocation.CommandInvoker
|
+--tweed.invocation.LoopbackInvoker
- public class LoopbackInvoker
- extends CommandInvoker
This invoker calls a CommandExecutor
which resides in the same VM.
Travel of the ExternalizedCommand
between client and server
is simulated with serialization / deserialization in memory.
This is especially useful for building tests.
Command implementors should not manipulate this class directly.
- Version:
- $Id$
- Author:
- Laurent Caillette
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoopbackInvoker
public LoopbackInvoker(Context context)
getExecutor
public CommandExecutor getExecutor()
setExecutor
public void setExecutor(CommandExecutor executor)
simulateTravel
protected ExternalizedCommand simulateTravel(ExternalizedCommand externalizedCommand)
throws java.io.IOException
- Serializes / deserializes
ExternalizedCommand
in memory
to simulate travel between client and server.
- Parameters:
externalizedCommand
-
- Returns:
- an other instance of the
ExternalizedCommand
passed in input, after serialization /deserialization.
java.io.IOException
doInvoke
protected ExternalizedCommand doInvoke(ExternalizedCommand externalizedCommand)
throws java.io.IOException
- Specified by:
doInvoke
in class CommandInvoker
java.io.IOException
Copyright © 2003 Laurent Caillette. All Rights Reserved.