|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.portico.lrc.LRCConnection
org.portico.binding.jvm.JVMClientConnection
public class JVMClientConnection
The client side connection for the JVM Binding. This class will route requests for the 3
non-federation bound requests (create,destroy and join) directly to the
RTIExec
(getting access to it through the JVMBootstrap
. On join, it will create
a new JVMServerConnection
. From then on, it will route any requests to the server
connections incoming message handler (which will route it to the RTI request sink).
Field Summary | |
---|---|
protected com.lbf.commons.messaging.IMessageHandler |
bootstrap
|
protected JVMServerConnection |
server
|
Fields inherited from class org.portico.lrc.LRCConnection |
---|
logger, lrc |
Constructor Summary | |
---|---|
JVMClientConnection()
|
Method Summary | |
---|---|
private void |
bootstrapCreate(com.lbf.commons.messaging.MessageContext context)
Passes the create-federation reqeust directly onto the RTI. |
private void |
bootstrapDestroy(com.lbf.commons.messaging.MessageContext context)
Passes the destroy-federation reqeust directly onto the RTI. |
private void |
bootstrapJoin(com.lbf.commons.messaging.MessageContext context)
Pass the join request directly to the RTI execution. |
void |
close()
Doesn't do anything in the JVM connection |
void |
configure(com.lbf.commons.utils.Bag<String,?> properties)
When this method is executed, it will attempt to gain a reference to the JVMBootstrap , through which it can gain access to the RTI. |
private void |
fireMessage(com.lbf.commons.messaging.MessageContext context)
This method passes the given request directly to the RTI for processing. |
void |
sendMessage(com.lbf.commons.messaging.MessageContext context)
Sends the given message to the RTI. |
void |
startup()
Doesn't do anything in the JVM connection |
Methods inherited from class org.portico.lrc.LRCConnection |
---|
receiveCallback, receiveCallback |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JVMServerConnection server
protected com.lbf.commons.messaging.IMessageHandler bootstrap
Constructor Detail |
---|
public JVMClientConnection()
Method Detail |
---|
public void configure(com.lbf.commons.utils.Bag<String,?> properties) throws com.lbf.commons.config.ConfigurationException
JVMBootstrap
, through which it can gain access to the RTI. It will check the static
JVMBootstrap.INSTANCE
for this reference. If it is null, it means that there is no
active RTI (that contains the JVM bootstrap). As such, it tries to start an RTI first. Once
the RTI has been started, the JVMBootstrap.INSTANCE
variable should have been
populated and the reference is now taken and stored.
configure
in class LRCConnection
com.lbf.commons.config.ConfigurationException
public void startup()
startup
in class LRCConnection
public void close()
close
in class LRCConnection
public void sendMessage(com.lbf.commons.messaging.MessageContext context) throws Exception
Bootstrap.getBootstrapHandler()
).
If the request is a resign request, it sends the message to the associated federation and
then does some local cleanup if the result is a success.
If the request is any other type of message, it just attempts to fire it straight to the
federation using the fireMessage(MessageContext)
method.
sendMessage
in class LRCConnection
Exception
private void fireMessage(com.lbf.commons.messaging.MessageContext context)
private void bootstrapCreate(com.lbf.commons.messaging.MessageContext context)
private void bootstrapDestroy(com.lbf.commons.messaging.MessageContext context)
private void bootstrapJoin(com.lbf.commons.messaging.MessageContext context)
JVMServerConnection
class, connecting it to this JVMClientConnection
. That
connection is then passed as part of the join request and is stored in the RTI so that the
federate can be contacted for callbacks.
If the join request is successful, the server connection is stored locally. Through it, a
reference to the federation can be obtained so that requests can be passed on. If the join
is not successful, the reference isn't stored and no link is made.
|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |