Tabnine Logo
Instance.channel
Code IndexAdd Tabnine to your IDE (free)

How to use
channel
method
in
net.roboconf.core.model.beans.Instance

Best Java code snippets using net.roboconf.core.model.beans.Instance.channel (Showing top 6 results out of 315)

origin: roboconf/roboconf-platform

@Test
public void testWriteInstances_notEmpty() throws Exception {
  Component component = new Component( "comp" );
  Instance instance = new Instance( "inst" ).component( component ).status( InstanceStatus.DEPLOYING ).channel( "c" );
  instance.overriddenExports.put( "check", "true" );
  instance.data.put( "something", "else" );
  File targetFile = this.folder.newFile();
  RuntimeModelIo.writeInstances( targetFile, Arrays.asList( instance ));
  Assert.assertTrue( targetFile.exists());
  Assert.assertTrue( 0 < targetFile.length());
}
origin: roboconf/roboconf-platform

@Test
public void testChain() {
  Instance inst = new Instance().name( "ins" ).status( InstanceStatus.DEPLOYING ).component( null ).parent( null );
  Assert.assertEquals( 0, inst.channels.size());
  Assert.assertEquals( "ins", inst.getName());
  Assert.assertEquals( InstanceStatus.DEPLOYING, inst.getStatus());
  Assert.assertNull( inst.getComponent());
  Assert.assertNull( inst.getParent());
  Assert.assertEquals( 1, inst.channel( "woo" ).channels.size());
  Assert.assertEquals( 2, inst.channel( "yeah" ).channels.size());
  Assert.assertEquals( 2, inst.channel( "woo" ).channels.size());
}
origin: roboconf/roboconf-platform

@Test
public void testDuplicateInstance_singleInstance() {
  Instance original = new Instance( "inst" ).channel( "chan" ).component( new Component( "comp" ));
  original.overriddenExports.put( "test", "test" );
  original.overriddenExports.put( "A.port", "8012" );
  original.data.put( "some", "data" );
  original.getImports().put( "facet-name", new ArrayList<Import> ());
  original.setStatus( InstanceStatus.DEPLOYED_STARTED );
  Instance copy = InstanceHelpers.replicateInstance( original );
  Assert.assertEquals( original.getName(), copy.getName());
  Assert.assertEquals( original.channels, copy.channels );
  Assert.assertEquals( original.overriddenExports.size(), copy.overriddenExports.size());
  Assert.assertEquals( "test", copy.overriddenExports.get( "test" ));
  Assert.assertEquals( "8012", copy.overriddenExports.get( "A.port" ));
  Assert.assertEquals( 0, copy.getImports().size());
  Assert.assertEquals( original.getComponent(), copy.getComponent());
  Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, copy.getStatus());
}
origin: roboconf/roboconf-platform

@Test
public void testOneInstanceWithChildren() throws Exception {
  Graphs graphs = buildGraphs();
  Component vmComponent = ComponentHelpers.findComponent( graphs, "VM" );
  Assert.assertNotNull( vmComponent );
  Component tomcatComponent = ComponentHelpers.findComponent( graphs, "Tomcat" );
  Assert.assertNotNull( tomcatComponent );
  Component warComponent = ComponentHelpers.findComponent( graphs, "WAR" );
  Assert.assertNotNull( warComponent );
  Instance vm = new Instance( "i-vm" ).component( vmComponent );
  Instance tomcat = new Instance( "i-tomcat" ).component( tomcatComponent );
  Instance war = new Instance( "i-war" ).component( warComponent );
  tomcat.overriddenExports.put( "Tomcat.port", "9004" );
  InstanceHelpers.insertChild( vm, tomcat );
  InstanceHelpers.insertChild( tomcat, war );
  vm.channel( "channel1" ).channel( "channel2" );
  war.data.put( "prop1", "value1" );
  war.data.put( "prop2", "value2" );
  compareInstances( graphs, Arrays.asList( vm ), false, true );
}
origin: roboconf/roboconf-platform

@Test
public void testMessage_addInstance() throws Exception {
  Instance child = new Instance( "child" ).channel( "channel 4" ).status( InstanceStatus.DEPLOYED_STOPPED );
  child.component( new Component( "comp_child" ).installerName( "whatever" ));
  MsgCmdAddInstance msg = new MsgCmdAddInstance( child );
  checkBasics( msg, MsgCmdAddInstance.class );
  Instance root = new Instance( "root" ).status( InstanceStatus.DEPLOYED_STARTED ).channel( "channel1" ).channel( "channel2" );
  root.component( new Component( "comp_root" ).installerName( "whatever" ));
  InstanceHelpers.insertChild( root, child );
  msg = new MsgCmdAddInstance( child );
  checkBasics( msg, MsgCmdAddInstance.class );
  msg = new MsgCmdAddInstance( new Instance( "instance without component" ));
  checkBasics( msg, MsgCmdAddInstance.class );
}
origin: roboconf/roboconf-platform

Instance original_1 = new Instance( "inst-1" ).channel( "chan" ).component( new Component( "comp-1" ));
original_1.overriddenExports.put( "test", "test" );
original_1.overriddenExports.put( "A.port", "8012" );
Instance original_2 = new Instance( "inst-2" ).channel( "chan" ).component( new Component( "comp-2" ));
original_2.overriddenExports.put( "port", "8012" );
Instance original_22 = new Instance( "inst-22" ).channel( "chan" ).component( new Component( "comp-78" ));
Instance original_3 = new Instance( "inst-3" ).channel( "chan" ).component( new Component( "comp-3" ));
original_3.overriddenExports.put( "ip", "localhost" );
net.roboconf.core.model.beansInstancechannel

Javadoc

Adds a channel in a chain approach.

Popular methods of Instance

  • getName
  • getComponent
  • getStatus
  • <init>
  • getImports
  • setStatus
  • component
  • getParent
  • getChildren
  • setName
  • setComponent
  • name
    Sets the name in a chain approach.
  • setComponent,
  • name,
  • setParent,
  • status,
  • equals,
  • parent,
  • toString

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JFrame (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Vim 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