|
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
public abstract class LRCConnection
The LRC needs an entry point into each communications binding. That entry point should be a
subclass of LRCConnection
. This class provides some helper methods designed to make
the job of concrete implementations easier.
sendMessage(MessageContext)
method that takes the message and sends it to the RTI. The
receiveCallback(FED_CallbackMessage)
and receiveCallback(MessageContext)
methods are provides as helpers, and should be invoked by the connection any time it receives
a callback.
Each connection implementation also needs to implement two lifecycle methods: startup()
and close()
. It can also optionally implement a third method called
configure(Bag)
that will allow it to perform any pre-startup initialization.
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
logger
|
protected LRC |
lrc
|
Constructor Summary | |
---|---|
protected |
LRCConnection()
|
Method Summary | |
---|---|
abstract void |
close()
This method is called when the connection should be closed. |
void |
configure(com.lbf.commons.utils.Bag<String,?> properties)
This method will check the given properties for the LRC.KEY_LRC , which should be
bound to an instance of the LRC that this connection is to be associated with. |
void |
receiveCallback(FED_CallbackMessage message)
The same as receiveCallback(MessageContext) except that it works with a callback
message rather than a context. |
void |
receiveCallback(com.lbf.commons.messaging.MessageContext context)
This method will drop the provided message on the callback queue . |
abstract void |
sendMessage(com.lbf.commons.messaging.MessageContext context)
Any connection implementation must implement this method in the manner appropriate for the connection type. |
abstract void |
startup()
This method is called when the connection is first started. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LRC lrc
protected org.apache.log4j.Logger logger
Constructor Detail |
---|
protected LRCConnection()
Method Detail |
---|
public void configure(com.lbf.commons.utils.Bag<String,?> properties) throws com.lbf.commons.config.ConfigurationException
LRC.KEY_LRC
, which should be
bound to an instance of the LRC
that this connection is to be associated with. If
that property is missing, an exception will be thrown.
com.lbf.commons.config.ConfigurationException
public abstract void startup() throws JRTIinternalError
configure(Bag)
, but before the connection is asked to send any messages.
JRTIinternalError
public abstract void close() throws JRTIinternalError
JRTIinternalError
public abstract void sendMessage(com.lbf.commons.messaging.MessageContext context) throws Exception
Exception
public void receiveCallback(com.lbf.commons.messaging.MessageContext context) throws JRTIinternalError
callback queue
. It is
expected that the request portion of the message context be of the type
FED_CallbackMessage
. If it is not, a JRTIinternalError
will be thrown.
JRTIinternalError
public void receiveCallback(FED_CallbackMessage message) throws Exception
receiveCallback(MessageContext)
except that it works with a callback
message rather than a context.
Exception
|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |