blob: a4d3e06331ed0588452f7554474cfc10987f1620 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>SMILA/Documentation/AgentController - Eclipsepedia</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="generator" content="MediaWiki 1.23.2" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/eclipse.org-common/themes/solstice/public/images/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (en)" />
<link rel="EditURI" type="application/rsd+xml" href="http://wiki.eclipse.org/api.php?action=rsd" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom feed" href="http://wiki.eclipse.org/index.php?title=Special:RecentChanges&amp;feed=atom" />
<link rel="stylesheet" href="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.ui.button&amp;only=styles&amp;skin=solstice&amp;*" />
<link rel="stylesheet" href="http://wiki.eclipse.org/skins/solstice/public/stylesheets/styles.min.css?303" media="screen, print" /><meta name="ResourceLoaderDynamicStyles" content="" />
<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: my_wiki:resourceloader:filter:minify-css:7:14ece53a42aa314864e5fd8c57f0d98f */</style>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"SMILA/Documentation/AgentController","wgTitle":"SMILA/Documentation/AgentController","wgCurRevisionId":285989,"wgRevisionId":285989,"wgArticleId":19391,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"SMILA/Documentation/AgentController","wgIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgWikiEditorEnabledModules":{"toolbar":false,"dialogs":false,"hidesig":true,"preview":false,"previewDialog":false,"publish":false},"wgCategoryTreePageCategoryOptions":"{\"mode\":0,\"hideprefix\":20,\"showcount\":true,\"namespaces\":false}"});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"solstice","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,
"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"variant":"en"});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});},{},{});
/* cache key: my_wiki:resourceloader:filter:minify-js:7:70d74423d3fc1e1c18fa9a1ff645a84a */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-javascript {line-height: normal;}
.source-javascript li, .source-javascript pre {
line-height: normal; border: 0px none white;
}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for javascript
* CSS class: source-javascript, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
* --------------------------------------
*/
.javascript.source-javascript .de1, .javascript.source-javascript .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.javascript.source-javascript {font-family:monospace;}
.javascript.source-javascript .imp {font-weight: bold; color: red;}
.javascript.source-javascript li, .javascript.source-javascript .li1 {font-weight: normal; vertical-align:top;}
.javascript.source-javascript .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.javascript.source-javascript .li2 {font-weight: bold; vertical-align:top;}
.javascript.source-javascript .kw1 {color: #000066; font-weight: bold;}
.javascript.source-javascript .kw2 {color: #003366; font-weight: bold;}
.javascript.source-javascript .kw3 {color: #000066;}
.javascript.source-javascript .kw5 {color: #FF0000;}
.javascript.source-javascript .co1 {color: #006600; font-style: italic;}
.javascript.source-javascript .co2 {color: #009966; font-style: italic;}
.javascript.source-javascript .coMULTI {color: #006600; font-style: italic;}
.javascript.source-javascript .es0 {color: #000099; font-weight: bold;}
.javascript.source-javascript .br0 {color: #009900;}
.javascript.source-javascript .sy0 {color: #339933;}
.javascript.source-javascript .st0 {color: #3366CC;}
.javascript.source-javascript .nu0 {color: #CC0000;}
.javascript.source-javascript .me1 {color: #660066;}
.javascript.source-javascript .ln-xtra, .javascript.source-javascript li.ln-xtra, .javascript.source-javascript div.ln-xtra {background-color: #ffc;}
.javascript.source-javascript span.xtra { display:block; }
/*]]>*/
</style><meta name="viewport" content="width=device-width, initial-scale=1.0"></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-SMILA_Documentation_AgentController skin-solstice action-view" id="solstice">
<a class="sr-only" href="AgentController.html#content">Skip to main content</a>
<div class="thin-header">
<header role="banner" class="hidden-print noprint">
<div class="container-fluid">
<div id="row-logo-search">
<div id="header-left">
<div class="row">
<div class="hidden-xs col-sm-6 logo-container">
<a href="https://www.eclipse.org/" ><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia"></a>
</div>
<div class="navbar col-sm-18 yamm" id="main-menu">
<div class="navbar-collapse collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a target="_self" href="https://eclipse.org/downloads/">Download</a></li>
<li><a target="_self" href="https://eclipse.org/users/">Getting Started </a></li>
<li><a target="_self" href="https://eclipse.org/membership/">Members</a></li>
<li><a target="_self" href="https://eclipse.org/projects/">Projects</a></li>
<li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="AgentController.html#">Community <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="AgentController.html#">Participate <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul></li><li class="dropdown visible-xs"><a class="dropdown-toggle" data-toggle="dropdown" href="AgentController.html#">Working Groups <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul></li><!-- More -->
<li class="dropdown hidden-xs"><a class="dropdown-toggle" data-toggle="dropdown">More<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<!-- Content container to add padding -->
<div class="yamm-content">
<div class="row">
<ul class="col-sm-8 list-unstyled"><li><p><strong>Community</strong></p></li><li><a href="http://marketplace.eclipse.org">Marketplace</a></li><li><a href="http://events.eclipse.org">Events</a></li><li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li><li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li><li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Participate</strong></p></li><li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li><li><a href="https://eclipse.org/forums/">Forums</a></li><li><a href="https://eclipse.org/mail/">Mailing Lists</a></li><li><a href="https://wiki.eclipse.org/">Wiki</a></li><li><a href="https://wiki.eclipse.org/IRC">IRC</a></li><li><a href="https://eclipse.org/contribute/">How to Contribute</a></li></ul><ul class="col-sm-8 list-unstyled"><li><p><strong>Working Groups</strong></p></li><li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li><li><a href="http://iot.eclipse.org">Internet of Things</a></li><li><a href="http://locationtech.org">LocationTech</a></li><li><a href="http://lts.eclipse.org">Long-Term Support</a></li><li><a href="http://polarsys.org">PolarSys</a></li><li><a href="http://science.eclipse.org">Science</a></li><li><a href="http://openmdm.org">OpenMDM</a></li></ul> </div>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="navbar-header">
<button data-target="#navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.eclipse.org/" class="visible-xs navbar-brand"><img class="logo-eclipse-default" src="http://wiki.eclipse.org/skins/solstice/public/images/logo/eclipse-800x188.png" alt="Eclipsepedia" width="174"></a>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="defaut-breadcrumbs hidden-print noprint hidden-print clearfix" id="breadcrumb">
<div>
<ol class="breadcrumb">
<li><a href="https://www.eclipse.org/">Home</a></li>
<li><a href="http://wiki.eclipse.org/Main_Page">Eclipse Wiki</a></li>
<li class="active">SMILA/Documentation/AgentController</li></ol>
</div>
</section>
</div>
<div class="toolbar-menu breadcrumbs-offset noprint hidden-print margin-bottom-0 clearfix">
<div class="col-md-24">
<ol class="breadcrumb" role="navigation">
<li id="pt-login">
<a href="http://wiki.eclipse.org/index.php?title=Special:UserLogin&amp;returnto=SMILA%2FDocumentation%2FAgentController">
<i class="fa fa-sign-in fa-fw orange"></i> Log in </a>
</li>
</ul>
</div>
</div>
<main role="main" class="background-grey">
<div class="container-full padding-top-25">
<!-- content -->
<section id="content" class="mw-body container-full clearfix 0">
<div id="mw-js-message" style="display:none;"></div>
<!-- bodyContent -->
<div id="bodyContent">
<!-- jumpto -->
<div id="jump-to-nav" class="mw-jump">
Jump to: <a href="AgentController.html#mw-head">navigation</a>,
<a href="AgentController.html#p-search">search</a>
</div>
<!-- /jumpto -->
<!-- leftcol -->
<aside class="col-md-4 noprint hidden-print" id="leftcol">
<form class="input-group" role="form" id="form-eclipse-search" action="http://wiki.eclipse.org/index.php" id="searchform">
<input id="searchInput" class="search-query form-control" type="search" accesskey="f" title="Special:Search" placeholder="Search" name="search" value="">
<span class="input-group-btn">
<button value="search" id="mw-searchButton" type="submit" class="btn btn-default" title="Search the pages for this text" name="fulltext">
<i class="fa fa-search"></i>
</button>
</span>
</form>
<select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Navigation---</span></option><option value="/Main_Page">Main Page</option><option value="/Eclipsepedia:Community_portal">Community portal</option><option value="/Eclipsepedia:Current_events">Current events</option><option value="/Special:RecentChanges">Recent changes</option><option value="/Special:Random">Random page</option><option value="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Navigation</span></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Main_Page" id="n-mainpage" title="Visit the main page [z]" accesskey="z">Main Page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Community_portal" id="n-portal" title="About the project, what you can do, where to find things">Community portal</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Eclipsepedia:Current_events" id="n-currentevents" title="Find background information on current events">Current events</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChanges" id="n-recentchanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:Random" id="n-randompage" title="Load a random page [x]" accesskey="x">Random page</a></li> <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" id="n-help" title="The place to find out">Help</a></li></ul> <select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Toolbox---</span></option><option value="/index.php?title=SMILA/Documentation/AgentController&amp;action=info">Page information</option><option value="/index.php?title=SMILA/Documentation/AgentController&amp;oldid=285989">Permanent link</option><option value="/index.php?title=SMILA/Documentation/AgentController&amp;printable=yes">Printable version</option><option value="/Special:SpecialPages">Special pages</option><option value="/Special:RecentChangesLinked/SMILA/Documentation/AgentController">Related changes</option><option value="/Special:WhatLinksHere/SMILA/Documentation/AgentController">What links here</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Toolbox</span></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;action=info" id="t-info">Page information</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;oldid=285989" id="t-permalink" title="Permanent link to this revision of the page">Permanent link</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;printable=yes" id="t-print" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:SpecialPages" id="t-specialpages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:RecentChangesLinked/SMILA/Documentation/AgentController" id="t-recentchangeslinked" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="http://wiki.eclipse.org/Special:WhatLinksHere/SMILA/Documentation/AgentController" id="t-whatlinkshere" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li></ul> </aside>
<!-- /leftcol -->
<!-- mainContent -->
<div id="mainContent" class="col-md-20">
<ul class="nav nav-tabs noprint hidden-print" role="tablist">
<li id="ca-nstab-main" class="active"><a href="AgentController.html" title="View the content page [c]" accesskey="c" tabindex="-1">Page</a></li>
<li id="ca-talk" class="new"><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/AgentController&amp;action=edit&amp;redlink=1" title="Discussion about the content page [t]" accesskey="t" tabindex="-1">Discussion</a></li>
<li id="ca-viewsource"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e" tabindex="-1">View source</a></li>
<li id="ca-history" class="collapsible"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;action=history" title="Past revisions of this page [h]" accesskey="h" tabindex="-1">History</a></li>
</ul> <div class="tab-content background-white">
<div id="tab-pane-main-page-content" class="tab-pane active">
<h1 id="firstHeading" class="firstHeading page-header">
<span dir="auto">SMILA/Documentation/AgentController</span>
</h1>
<div id="main-page-content">
<!-- subtitle -->
<div id="contentSub" class="alert alert-small alert-warning"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a>&lrm; | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a></span></div>
<!-- /subtitle -->
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="messagebox" style="background-color: #def3fe; border: 1px solid #c5d7e0; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="http://wiki.eclipse.org/File:Note.png" class="image"><img alt="Note.png" src="http://wiki.eclipse.org/images/c/cc/Note.png" width="35" height="35" /></a></div>
<div><b>This is deprecated for SMILA 1.0, the connectivity framework is still functional but will aimed to be replaced by scalable import based on SMILAs job management.</b><br /></div>
</div>
<p><br />
</p>
<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="AgentController.html#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="AgentController.html#API"><span class="tocnumber">2</span> <span class="toctext">API</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="AgentController.html#Implementations"><span class="tocnumber">3</span> <span class="toctext">Implementations</span></a>
<ul>
<li class="toclevel-2 tocsection-4"><a href="AgentController.html#org.eclipse.smila.connectivity.framework.impl"><span class="tocnumber">3.1</span> <span class="toctext">org.eclipse.smila.connectivity.framework.impl</span></a></li>
<li class="toclevel-2 tocsection-5"><a href="AgentController.html#Configuration"><span class="tocnumber">3.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2 tocsection-6"><a href="AgentController.html#JMX_interface"><span class="tocnumber">3.3</span> <span class="toctext">JMX interface</span></a></li>
<li class="toclevel-2 tocsection-7"><a href="AgentController.html#HTTP_ReST_JSON_interface"><span class="tocnumber">3.4</span> <span class="toctext">HTTP ReST JSON interface</span></a>
<ul>
<li class="toclevel-3 tocsection-8"><a href="AgentController.html#Agent_Datasource_Listing"><span class="tocnumber">3.4.1</span> <span class="toctext">Agent Datasource Listing</span></a></li>
<li class="toclevel-3 tocsection-9"><a href="AgentController.html#Start_a_Agent"><span class="tocnumber">3.4.2</span> <span class="toctext">Start a Agent</span></a></li>
<li class="toclevel-3 tocsection-10"><a href="AgentController.html#Get_Agent_Statistics"><span class="tocnumber">3.4.3</span> <span class="toctext">Get Agent Statistics</span></a></li>
<li class="toclevel-3 tocsection-11"><a href="AgentController.html#Stop_a_Agent"><span class="tocnumber">3.4.4</span> <span class="toctext">Stop a Agent</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h2><span class="mw-headline" id="Overview">Overview</span></h2>
<p>The AgentController is a component that manages and monitors Agents. Whenever a new agent task is triggered (via <tt>startAgent()</tt>) a new instance of the used Agent is created and the agent object hash value is used a an id (called <i>import run id</i>) to identify records created by this agent instance. This import run id is set as an attribute <i>_importRunId</i> on all records and will also visible on the agent instance in the JMX console.
</p>
<h2><span class="mw-headline" id="API">API</span></h2>
<p>AgentController provides two interfaces, one is used by management clients to start/stop agent instances, the other is used by Agents to execute callback methods on the AgentController itself, executing the ccommon processing logic.
</p><p>Javadoc:
</p>
<ul>
<li> <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/connectivity/framework/AgentController.html">org.eclipse.smila.connectivity.framework.AgentController</a>
</li>
<li> <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/connectivity/framework/util/AgentControllerCallback.html">org.eclipse.smila.connectivity.framework.util.AgentControllerCallback</a>
</li>
</ul>
<h2><span class="mw-headline" id="Implementations">Implementations</span></h2>
<p>It is possible to provide different implementations for the AgentController interface. At the moment there is one implementation available.
</p>
<h3><span class="mw-headline" id="org.eclipse.smila.connectivity.framework.impl">org.eclipse.smila.connectivity.framework.impl</span></h3>
<p>This bundle contains the default implementation of the AgentController interface.
</p><p>The AgentController implements the general processing logic common for all types of Agents. Its interface is a pure management interface that can be accessed by its Java interface or its wrapping JMX interface. It has references to the following OSGi services:
</p>
<ul>
<li> ConnectivityManager
</li>
<li> Agent ComponentFactory
</li>
<li> ConfigurationManagement (t.b.d.)
</li>
<li> CompoundManagement (t.b.d.)
</li>
</ul>
<p>Agent Factories register themselves at the AgentController. Each time an agent is started with a datasource for a specific type of agent, a new instance of that Agent type is created via the Agent ComponentFactory. This allows parallel watching of datasources with the same type (e.g. several rss feeds). Note that it is not possible to start muptiple agents on the same data source concurrently!
</p><p><br />
This chart shows the current AgentController processing logic for one agent run:
<a href="http://wiki.eclipse.org/File:AgentControllerProcessingLogic.png" class="image"><img alt="AgentControllerProcessingLogic.png" src="http://wiki.eclipse.org/images/b/bd/AgentControllerProcessingLogic.png" width="960" height="720" /></a>
</p>
<ul>
<li> the Agent is started, initializes DeltaIndexing for the data source by calling <tt>DeltaIndexingManager:init(...)</tt> and waits for events in a separate thread. One of the following events can occur:
<ul>
<li> ADD: a new or updated object on the datasource was detected. A record object is created. It is checked if the record was updated by calling <tt>DeltaIndexingManager:checkForUpdate(...)</tt>
<ul>
<li> YES: the record is added to the Queue by calling <tt>ConnectivityManager:add(...)</tt> and updated in the DeltaIndexingManager by calling <tt>DeltaIndexingManager:visit(...)</tt>
</li>
<li> NO: no actions are taken
</li>
</ul>
</li>
<li> DELETE: an object on the datasource was deleted. An Id object is created for the deleted object. This Id is deleted from both ConnectivityManager and DeltaIndexingManager by calling <tt>ConnectivityManager:delete(...)</tt>and <tt>DeltaIndexingManager:delete(..)</tt>.
</li>
<li> STOP: the agent is stopped either via an external command or because some fatal errors occured
<ul>
<li> it finishes DeltaIndexing by calling <tt>DeltaIndexingManager:finish(...)</tt> and ends the thread
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>The processing logic will be enhanced when CompoundManagement is integrated.
</p>
<dl>
<dt>Note
</dt>
</dl>
<p>The exact logic depends on the settings of DeltaIndexing in the data source configuration. Depending on the configured value, delta indexing logic is executed fully, partially or not at all.
</p>
<h3><span class="mw-headline" id="Configuration">Configuration</span></h3>
<p>There are no configuration options available for this bundle.
</p>
<h3><span class="mw-headline" id="JMX_interface">JMX interface</span></h3>
<p>Javadoc: <a rel="nofollow" class="external text" href="http://build.eclipse.org/rt/smila/javadoc/current/org/eclipse/smila/connectivity/framework/AgentControllerAgent.html">org.eclipse.smila.connectivity.framework.AgentControllerAgent</a>
</p><p>Here is a screenshot of the AgentController in the JMX Console:
</p><p><a href="http://wiki.eclipse.org/File:AgentControllerJMX.png" class="image"><img alt="AgentControllerJMX.png" src="http://wiki.eclipse.org/images/0/06/AgentControllerJMX.png" width="713" height="443" /></a>
</p>
<h3><span class="mw-headline" id="HTTP_ReST_JSON_interface">HTTP ReST JSON interface</span></h3>
<p>Since version 0.9 the AgentController can also be controlled via the SMILA ReST API. It provides the following endpoints:
</p>
<table border="1px solid #CCC" cellpadding="5px" style="border:1px solid #CCC; border-collapse:collapse; font:small/1.5 Tahoma, Bitstream Vera Sans, Verdana, Helvetica, sans-serif;">
<tr>
<th> endpoint </th>
<th> method </th>
<th> description
</th></tr>
<tr>
<td> /smila/agents </td>
<td> GET </td>
<td> list data sources available for agents and the current agent state
</td></tr>
<tr>
<td> /smila/agents/&lt;datasource-id&gt; </td>
<td> GET </td>
<td> get statistics of current or last agent run, if one exists.
</td></tr>
<tr>
<td> /smila/agents/&lt;datasource-id&gt; </td>
<td> POST + JSON-Body </td>
<td> start agent
</td></tr>
<tr>
<td> /smila/agents/&lt;datasource-id&gt;/finish </td>
<td> POST </td>
<td> stop agent
</td></tr>
</table>
<h4><span class="mw-headline" id="Agent_Datasource_Listing">Agent Datasource Listing</span></h4>
<p>The listing contains the available data sources that can be used for crawling and the current agent state. State "Undefined" means that no agent run for the datasource has yet been started. Other states can be
</p>
<ul>
<li> Initializing: The agent is starting
</li>
<li> Running: A agent is current working on this datasource.
</li>
<li> Stopped: The agent was stopped by the user.
</li>
<li> Aborted: A fatal error occurred while working on the datasource.
</li>
</ul>
<p>If the state has one of these four values, it is possible to read statistics for the datasource by using the given URL. Example:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">GET <span class="sy0">/</span>smila<span class="sy0">/</span>agents<span class="sy0">/</span>
<span class="sy0">--&gt;</span>
<span class="nu0">200</span> OK
<span class="br0">&#123;</span>
<span class="st0">&quot;agents&quot;</span><span class="sy0">:</span> <span class="br0">&#91;</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span><span class="sy0">:</span> <span class="st0">&quot;feeds&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;state&quot;</span><span class="sy0">:</span> <span class="st0">&quot;Running&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;url&quot;</span><span class="sy0">:</span> <span class="st0">&quot;http://localhost:8080/smila/agents/feeds/&quot;</span>
<span class="br0">&#125;</span><span class="sy0">,</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;name&quot;</span><span class="sy0">:</span> <span class="st0">&quot;jobfile&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;state&quot;</span><span class="sy0">:</span> <span class="st0">&quot;Undefined&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;url&quot;</span><span class="sy0">:</span> <span class="st0">&quot;http://localhost:8080/smila/agents/jobfile/&quot;</span>
<span class="br0">&#125;</span>
<span class="br0">&#93;</span>
<span class="br0">&#125;</span></pre></div></div>
<h4><span class="mw-headline" id="Start_a_Agent">Start a Agent</span></h4>
<p>If a datasource is not in agent state "Running" it can be started using the URL given in the datasource listing. The request must contain a JSON body describing the destination job to submit records to. In case of success the response contains the internal import run ID.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">POST <span class="sy0">/</span>smila<span class="sy0">/</span>agents<span class="sy0">/</span>feeds<span class="sy0">/</span>
<span class="br0">&#123;</span>
<span class="st0">&quot;jobName&quot;</span><span class="sy0">:</span> <span class="st0">&quot;indexUpdateJob&quot;</span>
<span class="br0">&#125;</span>
<span class="sy0">--&gt;</span>
<span class="nu0">200</span> OK
<span class="br0">&#123;</span>
<span class="st0">&quot;importRunId&quot;</span><span class="sy0">:</span> <span class="nu0">1231907158</span>
<span class="br0">&#125;</span></pre></div></div>
<p>Other response codes:
</p>
<ul>
<li> 400 Bad Request: datasource ID does not exist, destination job not given or not active, datasource is not a agent source or a agent is already running for the datasource.
</li>
<li> 500 Internal Server Error: Ohter errors.
</li>
</ul>
<h4><span class="mw-headline" id="Get_Agent_Statistics">Get Agent Statistics</span></h4>
<p>If a datasource has been agent or is currently agent you can read the performance counters using the datasource URL:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">GET <span class="sy0">/</span>smila<span class="sy0">/</span>agents<span class="sy0">/</span>feeds<span class="sy0">/</span>
<span class="sy0">--&gt;</span>
<span class="nu0">200</span> OK
<span class="br0">&#123;</span>
<span class="st0">&quot;jobName&quot;</span><span class="sy0">:</span> <span class="st0">&quot;indexUpdateJob&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;attachmentBytesTransfered&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;attachmentTransferRate&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;averageAttachmentTransferRate&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;averageDeltaIndicesProcessingTime&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;averageRecordsProcessingTime&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;deltaIndices&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;errorBuffer&quot;</span><span class="sy0">:</span> <span class="st0">&quot;[]&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;exceptions&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;exceptionsCritical&quot;</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">,</span>
<span class="st0">&quot;importRunId&quot;</span><span class="sy0">:</span> <span class="st0">&quot;1231907158&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;overallAverageDeltaIndicesProcessingTime&quot;</span><span class="sy0">:</span> <span class="nu0">1990.95</span><span class="sy0">,</span>
<span class="st0">&quot;overallAverageRecordsProcessingTime&quot;</span><span class="sy0">:</span> <span class="nu0">1990.95</span><span class="sy0">,</span>
<span class="st0">&quot;records&quot;</span><span class="sy0">:</span> <span class="nu0">460</span><span class="sy0">,</span>
<span class="st0">&quot;startDate&quot;</span><span class="sy0">:</span> <span class="st0">&quot;2011-09-06&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;dataSourceId&quot;</span><span class="sy0">:</span> <span class="st0">&quot;feeds&quot;</span><span class="sy0">,</span>
<span class="st0">&quot;state&quot;</span><span class="sy0">:</span> <span class="st0">&quot;Running&quot;</span>
<span class="br0">&#125;</span></pre></div></div>
<p>Other responses are
</p>
<ul>
<li>400 Bad Request: Invalid datasource ID
</li>
<li>404 Not Found: No statistics available for given datasource
</li>
<li>500 Internal Server Error: Other error.
</li>
</ul>
<h4><span class="mw-headline" id="Stop_a_Agent">Stop a Agent</span></h4>
<p>To stop a running agent, use the following HTTP request. The response will be empty, just the response code will be "OK".
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="javascript source-javascript"><pre class="de1">POST <span class="sy0">/</span>smila<span class="sy0">/</span>agents<span class="sy0">/</span>feeds<span class="sy0">/</span>finish<span class="sy0">/</span>
<span class="sy0">--&gt;</span>
<span class="nu0">200</span> OK</pre></div></div>
<p>Other responses are:
</p>
<ul>
<li> 400 Bad Request: No agent is running for this datasource.
</li>
<li> 500 Internal Server Error: Other errors.
</li>
</ul>
<!--
NewPP limit report
CPU time usage: 0.148 seconds
Real time usage: 0.202 seconds
Preprocessor visited node count: 112/1000000
Preprocessor generated node count: 346/1000000
Post‐expand include size: 1221/2097152 bytes
Template argument size: 515/2097152 bytes
Highest expansion depth: 5/40
Expensive parser function count: 0/100
-->
<!-- Saved in parser cache with key my_wiki:pcache:idhash:19391-0!*!*!!en!2!* and timestamp 20150414084636 and revision id 285989
-->
</div>
<!-- catlinks -->
<div id='catlinks' class='catlinks catlinks-allhidden'></div> <!-- /catlinks -->
</div>
</div>
</div>
</div>
<!-- /maincontent -->
<!-- printfooter -->
<div class="printfooter">
Retrieved from "<a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;oldid=285989">http://wiki.eclipse.org/index.php?title=SMILA/Documentation/AgentController&amp;oldid=285989</a>" </div>
<!-- /printfooter -->
<!-- debughtml -->
<!-- /debughtml -->
</div>
<!-- /bodyContent -->
</section>
<!-- /content -->
<!-- footer -->
</div> <section id="footer-contribution-info" style="border-top:1px solid #ccc;" class="footer-offset background-white margin-top-25"><div class="container text-center padding-top-10 padding-bottom-10"><p id="footercredit">This page was last modified 05:42, 24 January 2012 by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit&amp;redlink=1" class="new" title="User:Juergen.schumacher.attensity.com (page does not exist)">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/User:Andreas.Weber.empolis.com" title="User:Andreas.Weber.empolis.com">Andreas Weber</a> and <a href="http://wiki.eclipse.org/User:Daniel.stucky.empolis.com" title="User:Daniel.stucky.empolis.com">Daniel Stucky</a>.</p><p id="footerviews">This page has been accessed 5,031 times.</p></div></section> </main> <!-- /#main-content-container-row -->
<p id="back-to-top" class="noprint hidden-print">
<a class="visible-xs" href="AgentController.html#top">Back to the top</a>
</p>
<footer role="contentinfo" class="noprint hidden-print">
<div class="container">
<div class="row">
<section id="footer-eclipse-foundation" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Eclipse Foundation</h2>
<ul class="nav">
<li><a href="https://eclipse.org/org/">About us</a></li>
<li><a href="https://eclipse.org/org/foundation/contact.php">Contact Us</a></li>
<li><a href="https://eclipse.org/donate">Donate</a></li>
<li><a href="https://eclipse.org/org/documents/">Governance</a></li>
<li><a href="https://eclipse.org/artwork/">Logo and Artwork</a></li>
<li><a href="https://eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
</ul>
</section>
<section id="footer-legal" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Legal</h2>
<ul class="nav">
<li><a href="https://eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="https://eclipse.org/org/documents/epl-v10.php">Eclipse Public License </a></li>
<li><a href="https://eclipse.org/legal/">Legal Resources </a></li>
</ul>
</section>
<section id="footer-useful-links" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Useful Links</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
<li><a href="http://help.eclipse.org/">Documentation</a></li>
<li><a href="https://eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://eclipse.org/forums/">Forums</a></li>
<li><a href="http://marketplace.eclipse.org/">Marketplace</a></li>
</ul>
</section>
<section id="footer-other" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0">
<h2 class="section-title">Other</h2>
<ul class="nav">
<li><a href="https://eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://eclipse.org/projects">Community of Projects</a></li>
<li><a href="https://eclipse.org/org/workinggroups/">Working Groups</a></li>
</ul>
<ul class="list-inline social-media">
<li><a href="https://twitter.com/EclipseFdn"><i class="fa fa-twitter-square"></i></a></li>
<li><a href="https://plus.google.com/+Eclipse"><i class="fa fa-google-plus-square"></i></a></li>
<li><a href="https://www.facebook.com/eclipse.org"><i class="fa fa-facebook-square"></i> </a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn"><i class="fa fa-youtube-square"></i></a></li>
</ul>
</section>
<div id="copyright" class="col-xs-offset-1 col-sm-14 col-md-24 col-md-offset-0">
<div>
<span><img src="http://eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-logo-bw-800x188.png" alt="Eclipse.org black and white logo" width="166" height="39" id="logo-eclipse-white"/></span>
<p id="copyright-text">Copyright &copy; 2014 The Eclipse Foundation. All Rights Reserved.</p>
</div>
</div>
<a href="AgentController.html#" class="scrollup">Back to the top</a>
</div>
</div>
</footer>
<script src="http://wiki.eclipse.org/skins/solstice/public/javascript/main.min.js"></script>
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-910670-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script> <!-- /footer -->
<script>/*<![CDATA[*/window.jQuery && jQuery.ready();/*]]>*/</script><script>if(window.mw){
mw.loader.state({"skins.solstice":"loading","site":"ready","user":"ready","user.groups":"ready"});
}</script>
<script src="http://wiki.eclipse.org/load.php?debug=false&amp;lang=en&amp;modules=skins.solstice&amp;only=scripts&amp;skin=solstice&amp;*"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest"],null,true);
}</script>
<script>if(window.mw){
mw.config.set({"wgBackendResponseTime":408});
}</script> </body>
</html>