Codota Logo
ClientSessionMessageFilter
Code IndexAdd Codota to your IDE (free)

How to use
ClientSessionMessageFilter
in
org.jbundle.thin.base.message.session

Best Java code snippets using org.jbundle.thin.base.message.session.ClientSessionMessageFilter (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.jbundle.thin.base/org.jbundle.thin.base.remote

  /**
   * Link this filter to this remote session.
   * This is ONLY used in the server (remote) version of a filter.
   * Override this to finish setting up the filter (such as behavior to adjust this filter).
   * Or if the server version of this filter is different, you have a chance to change the filter.
   * @param remoteSession The remote session to link/set.
   */
  public BaseMessageFilter linkRemoteSession(Object remoteSession)
  {
    return new ServerSessionMessageFilter(this.getQueueName(), this.getQueueType(), null, remoteSession, m_bPrivate, true); // This is hooked to a thin filter
  }
}
origin: org.jbundle.thin.base/org.jbundle.thin.base.remote

/**
 * Constructor.
 * @param strQueueName The queue name.
 * @param strQueueType The queue type.
 * @param source The source (sender).
 * @param session The remote session.
 * @param propertiesForFilter The properties for the filter.
 */
public ClientSessionMessageFilter(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter)
{
  this();
  this.init(strQueueName, strQueueType, source, session, propertiesForFilter, false);
}
/**
origin: com.tourgeek.tour/com.tourgeek.tour.util

Properties properties = new Properties();
BaseMessageFilter filterForSession = new ClientSessionMessageFilter(null, m_remoteSession, properties);
origin: org.jbundle.thin.base/org.jbundle.thin.base.remote

/**
 * Constructor.
 * @param strQueueName The queue name.
 * @param strQueueType The queue type.
 * @param source The source (sender).
 * @param session The remote session.
 * @param propertiesForFilter The properties for the filter.
 */
public void init(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter, boolean bPrivate)
{
  super.init(strQueueName, strQueueType, source, null);
  m_session = session;
  m_propertiesForFilter = propertiesForFilter;
  m_bPrivate = bPrivate;
  this.setThinTarget(true);   // Yes, this is always a thin target
}
/**
origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

if (filterForSession instanceof ClientSessionMessageFilter)
  if (((ClientSessionMessageFilter)filterForSession).getRemoteSession() == remoteSession)
origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

Properties properties = new Properties();
properties.setProperty(MessageConstants.CLASS_NAME, MessageConstants.GRID_FILTER);
BaseMessageFilter filterForSession = new ClientSessionMessageFilter(MessageConstants.RECORD_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, remoteSessionMain, properties);
filterForSession.addMessageListener(listenerForSession);
synchronized (this.getBaseApplet().getRemoteTask())
origin: com.tourgeek.thin.app/com.tourgeek.thin.app.booking

BaseMessageFilter filterForSession = new ClientSessionMessageFilter(MessageConstants.RECORD_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, bookingDetailSession, properties);
filterForSession.addMessageListener(listenerForSession);
synchronized (this.getBaseApplet().getRemoteTask())
origin: org.jbundle.thin.base/org.jbundle.thin.base.remote

/**
 * Constructor.
 * @param strQueueName The queue name.
 * @param strQueueType The queue type.
 * @param source The source (sender).
 * @param session The remote session.
 * @param propertiesForFilter The properties for the filter.
 */
public ClientSessionMessageFilter(String strQueueName, String strQueueType, Object source, RemoteSession session, Map propertiesForFilter, boolean bPrivate)
{
  this();
  this.init(strQueueName, strQueueType, source, session, propertiesForFilter, bPrivate);
}
/**
origin: org.jbundle.thin.base/org.jbundle.thin.base.remote

/**
 * Constructor.
 * @param strQueueName The queue name.
 * @param strQueueType The queue type.
 * @param source The source (sender).
 * @param session The remote session.
 * @param propertiesForFilter The properties for the filter.
 */
public ClientSessionMessageFilter(Object source, RemoteSession session, Map propertiesForFilter)
{
  this();
  this.init(MessageConstants.SESSION_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, source, session, propertiesForFilter, true);
}
/**
org.jbundle.thin.base.message.sessionClientSessionMessageFilter

Javadoc

A ClientSessionMessageFilter is a filter that passes the remote session to the server. This is used to simplify the task of passing a message from the session up to a thin client. All you need to do in the session is send a message with a SessionMessageHeader and the client will get it. Be careful to specify private if you don't want to receive other messages on this queue (or don't if you want all messages). Listen carefully.... this is a little complicated: Three classes: ClientSessionMessageFilter, ServerSessionMessageFilter, and SessionMessageHeader work together to solve the following problem: A Thin client can listen on any queue, but will fail if a thick message or messageHeader is delivered to it. To solve this problem, the server handles all the messages, converts them to a version a thin client can read and sends that version up. First, the thin client creates a ClientSessionMessageFilter and adds it to a queue that will not get thick messages (usually SERVER_QUEUE_NAME). Then the remote session creates a ServerSessionMessageFilter on the same queue. The ServerSessionMessageFilter will only respond to messages that originate from the server session. Then the remote session registers to listen for the thick message that the client wants. When the remote session receives the thick message, it converts it to a Thin (usually Base) message and sends it to the client by setting the header to a SessionMessageHeader and sending it to the client's queue. NOTE: This object is sent over the wire, so make sure you only fill it with simple, serializable objects!

Most used methods

  • <init>
    Constructor.
  • getQueueName
  • getQueueType
  • getRemoteSession
    Try to figure out the remote session that this filter belongs to.
  • init
    Constructor.
  • setThinTarget

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now