example.remote.interface.demo/src/terra/harvest/bundle/demo/RemoteInterfaceOSGiDemo.java
@Activate
    public void activate(final BundleContext context)  throws FactoryException, IOException
    {
        System.out.println(PRINT_TAG + "activating... connecting to Controller # " + this.m_TargetSystemID);
        
        // Connect to the target controller. Port 4000 is the default listening port for all controllers.
        this.m_RemoteChannelLookup.syncClientSocketChannel("localhost", 4000, this.m_TargetSystemID);
        System.out.println(PRINT_TAG + "Connected! Registering EventHandler...");
        
        this.m_Context = context;
        this.m_EventHandler = new DemoEventHandler();
        this.m_EventHandler.registerAllEvents(this.m_Context);
        System.out.println(PRINT_TAG + "all events registered, starting Config Admin demo");
        
        this.runConfigAdminDemo();
        
        System.out.println(PRINT_TAG + "Config Admin complete, beginning Mission Programming demo");
        this.runMissionProgrammingDemo();
        
        System.out.println(PRINT_TAG + "Mission Programming complete.");        
        System.out.println(PRINT_TAG + "Demo complete");
    }
/**
     * This is the entry point for the demo. Once the bundle is started, this method is called.
     * @param context
     *      the bundle context
     * @throws FactoryException
     *      if the bundle cannot be started
     * @throws IOException
     *      if an endpoint cannot be reached
     */
This is the entry point for the demo. Once the bundle is started, this method is called.
@param context
the bundle context
@throws FactoryException
if the bundle cannot be started
@throws IOException
if an endpoint cannot be reached
This is the entry point for the demo . Once the bundle is started this method is called . @param context the bundle context @throws FactoryException if the bundle cannot be started @throws IOException if an endpoint cannot be reached
@Activate
    public void activate(final BundleContext context)  throws FactoryException, IOException
    {
        System.out.println(PRINT_TAG + "activating... connecting to Controller # " + this.m_TargetSystemID);
        this.m_RemoteChannelLookup.syncClientSocketChannel("localhost", 4000, this.m_TargetSystemID);
        System.out.println(PRINT_TAG + "Connected! Registering EventHandler...");
        this.m_Context = context;
        this.m_EventHandler = new DemoEventHandler();
        this.m_EventHandler.registerAllEvents(this.m_Context);
        System.out.println(PRINT_TAG + "all events registered, starting Config Admin demo");
        this.runConfigAdminDemo();
        System.out.println(PRINT_TAG + "Config Admin complete, beginning Mission Programming demo");
        this.runMissionProgrammingDemo();
        System.out.println(PRINT_TAG + "Mission Programming complete.");        
        System.out.println(PRINT_TAG + "Demo complete");
    }
@ Activate public void activate ( final BundleContext context ) throws FactoryException , IOException { System . out . println ( PRINT_TAG + "activating... connecting to Controller # " + this . m_TargetSystemID ) ; this . m_RemoteChannelLookup . syncClientSocketChannel ( "localhost" , 4000 , this . m_TargetSystemID ) ; System . out . println ( PRINT_TAG + "Connected! Registering EventHandler..." ) ; this . m_Context = context ; this . m_EventHandler = new DemoEventHandler ( ) ; this . m_EventHandler . registerAllEvents ( this . m_Context ) ; System . out . println ( PRINT_TAG + "all events registered, starting Config Admin demo" ) ; this . runConfigAdminDemo ( ) ; System . out . println ( PRINT_TAG + "Config Admin complete, beginning Mission Programming demo" ) ; this . runMissionProgrammingDemo ( ) ; System . out . println ( PRINT_TAG + "Mission Programming complete." ) ; System . out . println ( PRINT_TAG + "Demo complete" ) ; }
This is the entry point for the demo.
This is the entry point for the demo .
// Connect to the target controller. Port 4000 is the default listening port for all controllers.