Tabnine Logo
AbstractMessageProcessor.start
Code IndexAdd Tabnine to your IDE (free)

How to use
start
method
in
net.roboconf.messaging.api.AbstractMessageProcessor

Best Java code snippets using net.roboconf.messaging.api.AbstractMessageProcessor.start (Showing top 5 results out of 315)

origin: net.roboconf/roboconf-messaging-api

/**
 * Associates a message processor with this instance.
 * <p>
 * The message processor cannot be started before. This method will start it.
 * </p>
 * <p>
 * This method must be invoked only once.
 * </p>
 * @param messageProcessor the message processor
 */
public void associateMessageProcessor( AbstractMessageProcessor<T> messageProcessor ) {
  if( this.messageProcessor != null )
    throw new IllegalArgumentException( "The message processor was already defined." );
  this.messageProcessor = messageProcessor;
  configureMessageProcessor( messageProcessor );
  this.messageProcessor.start();
}
origin: roboconf/roboconf-platform

/**
 * Associates a message processor with this instance.
 * <p>
 * The message processor cannot be started before. This method will start it.
 * </p>
 * <p>
 * This method must be invoked only once.
 * </p>
 * @param messageProcessor the message processor
 */
public void associateMessageProcessor( AbstractMessageProcessor<T> messageProcessor ) {
  if( this.messageProcessor != null )
    throw new IllegalArgumentException( "The message processor was already defined." );
  this.messageProcessor = messageProcessor;
  configureMessageProcessor( messageProcessor );
  this.messageProcessor.start();
}
origin: roboconf/roboconf-platform

@Test
public void testStartAndStop() throws Exception {
  Assert.assertFalse( this.processor.isRunning());
  this.processor.start();
  Thread.sleep( 200 );
  Assert.assertTrue( this.processor.isRunning());
  this.processor.stopProcessor();;
  Thread.sleep( 200 );
  Assert.assertFalse( this.processor.isRunning());
}
origin: roboconf/roboconf-platform

@Test
public void testInterrupt() throws Exception {
  Assert.assertFalse( this.processor.isRunning());
  this.processor.start();
  Thread.sleep( 200 );
  Assert.assertTrue( this.processor.isRunning());
  this.processor.interrupt();
  Thread.sleep( 200 );
  Assert.assertFalse( this.processor.isRunning());
}
origin: roboconf/roboconf-platform

@Test
public void testProcessing() throws Exception {
  // The message is processed...
  this.processor.start();
  this.processor.storeMessage( new MsgCmdResynchronize());
  Thread.sleep( 1000 );
  this.processor.stopProcessor();
  Assert.assertEquals( 0, this.processor.getMessageQueue().size());
}
net.roboconf.messaging.apiAbstractMessageProcessorstart

Popular methods of AbstractMessageProcessor

  • getMessageQueue
  • interrupt
  • stopProcessor
    Stops the processor.
  • isRunning
  • processMessage
    Processes a message.
  • setMessagingClient
    This method must be invoked before #start(). It is not recommended to change the messaging client on
  • storeMessage
    Stores a message so that it can be processed later.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JCheckBox (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now