|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.marketcetera.module.Module
org.marketcetera.modules.remote.receiver.ReceiverModule
public class ReceiverModule
A module that can receive any kind of data and emit it on a
remotely accessible messaging topic so that the data can be received
by remote recipients.
| Capabilities | Data Receiver |
|---|---|
| Stops data flows | No |
| Emits data flow errors | Yes, when it's unable to serialize or send the object over JMS |
| Start Operation | Starts the embedded JMS broker and connects to it. |
| Stop Operation | Stops the embedded broker. |
| Management Interface | ReceiverModuleMXBean |
| Factory | ReceiverFactory |
The module embeds a JMS message broker to transmit the messages to its
clients. The message broker is configured with a single topic on which
all the messages are broadcast.
The broker is started when the module is started and stopped when
the module is stopped.
Received Object Handling
The module will transmit all the received objects serialized as
ObjectMessage. If the received object is not
serializable, the module generates an error receiving that object
which is handled and logged by the module framework. The module
ignores null objects.
Authentication
The remote clients of this module need to authenticate themselves to
the message broker in order to connect. This module depends on the
client module for authentication.
The client module needs to be connected to the server for the
authentication to succeed and the credentials supplied must be the same
as used by the client to connect to the server.
Do note that this module programmatically sets up the JAAS
Configuration to make it easy to use.
However, such a setup may conflict with other JAAS clients within the same
JVM. If that happens, you can set the variable
setSkipJAASConfiguration(boolean) to false and make sure that
you setup the JAAS configuration yourself so that this module can work.
Here's the JAAS configuration needed for authentication to work.
remoting-amq-domain {
org.marketcetera.modulews.remote.receiver.ClientLoginModule required;
};
| Method Summary | |
|---|---|
LogEventLevel |
getLogLevel()
Gets the minimum log level of log events remotely transmitted by this module. |
String |
getURL()
Gets the URL at which remote emitters should be able to connect to this module. |
boolean |
isSkipJAASConfiguration()
If the module should skip the automatic JAAS configuration when it's started. |
protected void |
preStart()
|
protected void |
preStop()
|
void |
receiveData(DataFlowID inFlowID,
Object inData)
|
void |
setLogLevel(LogEventLevel inLevel)
Sets the minimum log level of log events remotely transmitted by this module. |
void |
setSkipJAASConfiguration(boolean inSkipJAASConfiguration)
Sets if the module should skip the automatic JAAS configuration when it's started. |
void |
setURL(String inURL)
Sets the URL at which remote emitters should be able to connect to this module. |
| Methods inherited from class org.marketcetera.module.Module |
|---|
getCreated, getLastStartFailure, getLastStopFailure, getStarted, getState, getStopped, getURN, isAutoCreated, isAutoStart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected void preStart()
throws ModuleException
preStart in class ModuleModuleException
protected void preStop()
throws ModuleException
preStop in class ModuleModuleException
public void receiveData(DataFlowID inFlowID,
Object inData)
throws ReceiveDataException
receiveData in interface DataReceiverReceiveDataExceptionpublic String getURL()
ReceiverModuleMXBean
getURL in interface ReceiverModuleMXBeanpublic void setURL(String inURL)
ReceiverModuleMXBean
setURL in interface ReceiverModuleMXBeaninURL - the URL value.public LogEventLevel getLogLevel()
ReceiverModuleMXBean
The returned log level corresponds to the log-level for the system-wide
logger category Messages.USER_MSG_CATEGORY.
getLogLevel in interface ReceiverModuleMXBeanpublic void setLogLevel(LogEventLevel inLevel)
ReceiverModuleMXBean
Setting this log level also sets the log level for the system-wide
logger category Messages.USER_MSG_CATEGORY.
Do note for this function to work correctly the system logger category should not be specified in the log4j configuration file. The log4j configuration file is reread whenever it's updated. If the log4j configuration file contains configuration for the system logger category, it will over-write the configuration carried out via this method and result in confusing system behavior.
setLogLevel in interface ReceiverModuleMXBeaninLevel - the log level value.public boolean isSkipJAASConfiguration()
ReceiverModuleMXBean
isSkipJAASConfiguration in interface ReceiverModuleMXBeanpublic void setSkipJAASConfiguration(boolean inSkipJAASConfiguration)
ReceiverModuleMXBean
setSkipJAASConfiguration in interface ReceiverModuleMXBeaninSkipJAASConfiguration - if the automatic JAAS configuration
should be skipped.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||