Keel 2.1RC2

org.keel.clients.direct
Class KeelClientDirect

java.lang.Object
  extended byorg.keel.clients.direct.KeelClientDirect
All Implemented Interfaces:
KeelClient

public class KeelClientDirect
extends java.lang.Object
implements KeelClient

Author:
Michael Nash Special version of the KeelClient interface that "wraps" the entire KeelServer process inside the same VM as the client, allowing an "all-in-one" deployment without any JMS required.
NOTE: If you use this client, there may be only one of them running within the VM - e.g. if you deploy both Struts and Cocoon, you cannot have both of them use the KeelClientDirect as the client, as AltRMI will fail on startup of the second container (due to a "port already in use" problem when starting the Instrumentation AltRMI port). If you're using multiple clients, you almost certainly want to be using a JMS-enabled version of KeelClient, so that only one server task is used to service the multiple clients.

Field Summary
private  int myId
           
private  KeelStarter myStarter
           
 
Fields inherited from interface org.keel.clients.KeelClient
CLIENT_CLASS, CLIENT_CONFIG, CONFIG_DIR
 
Constructor Summary
KeelClientDirect()
           
 
Method Summary
 KeelResponse execute(KeelRequest request)
          Run a business-process, using a request/response architecture
 int getId()
          Retrieve the client id
private  KeelStarter getStarter()
           
 void setId(int newId)
          Set the client id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myId

private int myId

myStarter

private KeelStarter myStarter
Constructor Detail

KeelClientDirect

public KeelClientDirect()
Method Detail

getStarter

private KeelStarter getStarter()
                        throws ModelException
Throws:
ModelException

execute

public KeelResponse execute(KeelRequest request)
                     throws ModelException,
                            java.io.IOException
Description copied from interface: KeelClient
Run a business-process, using a request/response architecture

Specified by:
execute in interface KeelClient
Parameters:
request - The request to pass to Keel
Returns:
Keel response
Throws:
ModelException
java.io.IOException

setId

public void setId(int newId)
Description copied from interface: KeelClient
Set the client id

Specified by:
setId in interface KeelClient
Parameters:
newId - The ID to set

getId

public int getId()
Description copied from interface: KeelClient
Retrieve the client id

Specified by:
getId in interface KeelClient
Returns:
The client ID

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.