Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 115006 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/tptp/platform/execution/datacollection/IBaseAgent.java (+1 lines)
Lines 201-205 Link Here
201
	 */
201
	 */
202
	public String getUUID(); 
202
	public String getUUID(); 
203
	
203
	
204
	public void processCommandLine(String argv[]);
204
}
205
}
205
206
(-)src/org/eclipse/tptp/platform/execution/datacollection/BaseAgent.java (-1 / +10 lines)
Lines 148-153 Link Here
148
    private native int sendEventNotifications0(ICommandFragment cmd);
148
    private native int sendEventNotifications0(ICommandFragment cmd);
149
    
149
    
150
    private native int addEventListener0(String eventsIID, int listenerID, int replyDest, int replyContext);
150
    private native int addEventListener0(String eventsIID, int listenerID, int replyDest, int replyContext);
151
152
	private native void processCommandLine0(String[] argv);
151
    
153
    
152
    public BaseAgent(String name) 
154
    public BaseAgent(String name) 
153
    {
155
    {
Lines 172-178 Link Here
172
                else
174
                else
173
                {
175
                {
174
                    _isInitialized = true;
176
                    _isInitialized = true;
175
                    System.out.println("Agent initialized");
176
                }
177
                }
177
            }
178
            }
178
            catch(Exception e)
179
            catch(Exception e)
Lines 578-583 Link Here
578
		}
579
		}
579
	}
580
	}
580
581
582
	public void processCommandLine(String[] argv) {
583
	    try {
584
	        processCommandLine0(argv);
585
	    }
586
	    catch(Exception e){
587
	    }
588
	}
589
581
//    /**
590
//    /**
582
//     * Called by the native implementation to indicate that the agent
591
//     * Called by the native implementation to indicate that the agent
583
//     * is now registered with the Agent Controller.
592
//     * is now registered with the Agent Controller.
(-)src/org/eclipse/tptp/platform/execution/samples/TPTPJavaAgent.java (-4 / +4 lines)
Lines 64-78 Link Here
64
		
64
		
65
		/* Register agent */
65
		/* Register agent */
66
		try
66
		try
67
		{
67
		{	jAgent.processCommandLine(args);
68
		    jAgent.register();
68
		    jAgent.register();
69
		}
69
		}
70
		catch(Exception e){e.printStackTrace();}
70
		catch(Exception e){e.printStackTrace();}
71
		
71
		Thread thread = new Thread(jAgent);
72
		Thread thread = new Thread(jAgent);
72
		thread.start();
73
		thread.start();
73
		
74
			
75
    }
74
    }
75
    
76
    public void processCommand(ICommandFragment cmd)
76
    public void processCommand(ICommandFragment cmd)
77
    {
77
    {
78
        super.processCommand(cmd);
78
        super.processCommand(cmd);
Lines 99-105 Link Here
99
    {
99
    {
100
        while(running)
100
        while(running)
101
        {
101
        {
102
            
102
            try { Thread.sleep(1000); } catch (Exception e) {}
103
        }
103
        }
104
        /* Deregister agent */
104
        /* Deregister agent */
105
		this.deregister();
105
		this.deregister();

Return to bug 115006