org.fuin.jmsmvc4swing.jms
Class MethodCallSender

java.lang.Object
  extended by org.fuin.jmsmvc4swing.jms.MethodCallSender

public abstract class MethodCallSender
extends Object

Base class for units sending a method call to a controller.


Constructor Summary
MethodCallSender(JmsJndiEnvironment env, String topicName, boolean determinate)
          Constructor.
 
Method Summary
protected  JmsJndiEnvironment getEnvironment()
          Returns the environment.
protected  String getTopicName()
          Returns the topic name.
 boolean isDeterminate()
          Returns if the method will send progress informations with min/max/value.
protected  void publish(String methodName, Data arguments, long id, MethodResultReceiver resultListener)
          Send a JMS message to the controller and register a subscriber to receive the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCallSender

public MethodCallSender(JmsJndiEnvironment env,
                        String topicName,
                        boolean determinate)
Constructor.

Parameters:
env - Environment to use.
topicName - Name of the topic (defined by the controller) to send to.
determinate - Information if the progress of the method is determinate.
Method Detail

getEnvironment

protected final JmsJndiEnvironment getEnvironment()
Returns the environment.

Returns:
Environment.

getTopicName

protected final String getTopicName()
Returns the topic name.

Returns:
Name of the topic (defined by the controller) to send to.

publish

protected final void publish(String methodName,
                             Data arguments,
                             long id,
                             MethodResultReceiver resultListener)
Send a JMS message to the controller and register a subscriber to receive the results.

Parameters:
methodName - Name of the method for creating the selector.
arguments - Arguments for the method call.
id - Id for creating the selector.
resultListener - Subscriber for the results.

isDeterminate

public final boolean isDeterminate()
Returns if the method will send progress informations with min/max/value.

Returns:
If determinate TRUE else FALSE.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.