|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.azuki.framework.command.Command
public final class Command
This class is an implementation of the Command Design Pattern. This implmentation adds support for : - Asynchronous processing - Callback - Queuing
Nested Class Summary | |
---|---|
static interface |
Command.Impl
|
Constructor Summary | |
---|---|
Command()
|
Method Summary | |
---|---|
static Object |
call(ICommand icmd)
Direct call to the process method of the ICommand object. |
static IQueue |
getQueue(String qname)
|
static Object |
invoke(ICommand icmd)
Deferred synchronous call to the process method of the command object. |
static Object |
invokeQueued(ICommand icmd,
IQueue queue,
ICommand.Priority pty)
Deferred synchronous call to the process method of the command object. |
static IQueue |
mainQueue()
|
static void |
send(ICommand icmd)
Asynchronous call to the process method of the ICommand object. |
static void |
sendCallback(ICommand icmd,
ICallback cback)
Asynchronous call to the process method of the command object. |
static void |
sendQueued(ICommand icmd,
IQueue queue,
ICommand.Priority pty)
Asynchronous call to the process method of the command object. |
static void |
sendQueuedCallback(ICommand icmd,
IQueue queue,
ICommand.Priority pty,
ICallback cback)
Asynchronous call to the process method of the command object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Command()
Method Detail |
---|
public static final IQueue mainQueue()
public static final IQueue getQueue(String qname)
public static final Object call(ICommand icmd) throws Exception
process
method of the ICommand
object.
Invocation is synchronous and performed by the same thread using the same thread context.
icmd
- The command pattern object containing the method to process.
ICommand
's process
method return.
Exception
public static final Object invoke(ICommand icmd) throws Exception
process
method of the command object.
Invocation is synchronous but performed by another thread using a different thread context.
icmd
- The command pattern object containing the method to process.
ICommand
's process
method return.
Exception
public static final Object invokeQueued(ICommand icmd, IQueue queue, ICommand.Priority pty) throws Exception
process
method of the command object.
Invocation is synchronous but performed by another thread using a different thread context.
The caller has specified a queue name and a priority for the command object processing.
icmd
- The command pattern object containing the method to process.queue
- The queue objectpty
- The priority
ICommand
's process
method return.
Exception
public static final void send(ICommand icmd)
process
method of the ICommand
object.
Invocation is asynchronous and performed by another thread using a different thread context.
icmd
- The command pattern object containing the method to process.public static final void sendQueued(ICommand icmd, IQueue queue, ICommand.Priority pty)
process
method of the command object.
Invocation is asynchronous and performed by another thread using a different thread context.
The caller has specified a queue name and a priority for the command object processing.
icmd
- The command pattern object containing the method to process.queue
- The queue objectpty
- The prioritypublic static final void sendCallback(ICommand icmd, ICallback cback)
process
method of the command object.
Invocation is asynchronous and performed by another thread using a different thread context.
The caller has specified a ICallback
object that will be called by the framework
at the completion of the ICommand
's process
method execution.
icmd
- The command pattern object containing the method to process.cback
- The object that will be call by the framework at the completion of
the ICommand
's process
method execution.public static final void sendQueuedCallback(ICommand icmd, IQueue queue, ICommand.Priority pty, ICallback cback)
process
method of the command object.
Invocation is asynchronous and performed by another thread using a different thread context.
The caller has specified a queue name and a priority for the command object processing.
The caller has also specified a ICallback
object that will be called by the framework
at the completion of the ICommand
's process
method execution.
icmd
- The command pattern object containing the method to process.queue
- The queue objectpty
- The prioritycback
- The object that will be call by the framework at the completion of
the ICommand
's process
method execution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |