{div:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR{div}
{div:id=description}{div}\\ 

{table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSClient]{span}{td}{tr}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSClient]{td}{td}[#createClient]\(solutionName, username, password, solutionOpenMethodArgs)
Creates a headless client on the server that will open the given solution.{td}{tr}{tbody}{tbody}{tr}{td}[JSClient]{td}{td}[#getClient]\(clientID)
Gets an existing headless client for the given client uuid.{td}{tr}{tbody}{tbody}{tr}{td}[JSClient]{td}{td}[#getOrCreateClient]\(clientId, solutionname, username, password, solutionOpenMethodArgs)
This will try to get a existing client by the given id if that client is already created for that specific solution;
it will create a headless client on the server that will open the given solution if it didn't exists yet.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=createClient-String_String_String_ObjectArray}{tr:id=name}{td}h6.createClient{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSClient]{span}{span:style=font-weight: bold;}createClient{span}{span}\(solutionName, username, password, solutionOpenMethodArgs){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} solutionName
\{[String]} username
\{[String]} password
\{[Object]\[]} solutionOpenMethodArgs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSClient]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Creates a headless client that will open the given solution.
var headlessClient = plugins.headlessclient.createClient("someSolution", "user", "pass", null);
if (headlessClient != null && headlessClient.isValid()) { 
	var x = new Object();
	x.name = 'remote1';
	x.number = 10;
	headlessClient.queueMethod(null, "remoteMethod", [x], callback);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getClient-String}{tr:id=name}{td}h6.getClient{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSClient]{span}{span:style=font-weight: bold;}getClient{span}{span}\(clientID){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} clientID
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSClient]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Gets an existing headless client for the given client uuid.
var headlessClient = plugins.headlessclient.getClient("clientID");
if (headlessClient != null && headlessClient.isValid()) {
	 headlessClient.queueMethod(null, "someRemoteMethod", null, callback);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getOrCreateClient-String_String_String_String_ObjectArray}{tr:id=name}{td}h6.getOrCreateClient{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSClient]{span}{span:style=font-weight: bold;}getOrCreateClient{span}{span}\(clientId, solutionname, username, password, solutionOpenMethodArgs){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} clientId -- The id of the client if it already exists, or it will be the id of the client if it will be created.
\{[String]} solutionname -- The solution to load
\{[String]} username -- The user name that is used to login to the solution
\{[String]} password -- The password for the user
\{[Object]\[]} solutionOpenMethodArgs -- The arguments that will be passed to the solution open method.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSClient] -- An existing JSClient or the JSClient that is created.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Creates a headless client that will open the given solution.
var storedSolutionSpecificID = "aaaabbbbccccc1111";
var headlessClient = plugins.headlessclient.getOrCreateClient(storedSolutionSpecificID, "someSolution", "user", "pass", null);
if (headlessClient != null && headlessClient.isValid()) { 
	var x = new Object();
	x.name = 'remote1';
	x.number = 10;
	headlessClient.queueMethod(null, "remoteMethod", [x], callback);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}