Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryGet a broadcast object giving it a (nick)name and on a specific channel, the callback is used for getting messages of other clients on that channel The function gets 3 arguments (nickName, message, channelName)Returns the current client JSClientInformation object.Returns an array of JSClientInformation elements describing the clients connected to the server./* Returns an array of JSClientInformation elements describing the clients connected to the server filtered by the a client info string.Get client that locked the record from a specific datasource or null if record is not locked.Get a dataset will all locks on the server.Returns true if the server is in maintenance mode, false otherwise.voidRelease all locks acquired by a client WARNING: use with carevoidSends a message to all connected clients.voidSends a message to a specific client, identified by its clientId.voidShuts down all connected clients.voidShuts down a specific client, identified by its clientId.voidShuts down a specific client, identified by its clientId.

functionservoy sDetail2100%height:30px2Methods DetailsgetBroadcastername

getBroadcaster(name, channelName, callback)

dessIndent
Get a broadcast object giving it a (nick)name and on a specific channel, the callback is used for getting messages of other clients on that channel
The function gets 3 arguments (nickName, message, channelName)
prs

Parameters

sIndentnameThe nickname for this user on this channelchannelNameThe channel name where should be listened to (and send messages to)callbackThe callback when for incomming messages
ret

Returns

sIndent BroadCaster
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetClientInformationname

getClientInformation()

dessIndent
Returns the current client JSClientInformation object. Note this is snapshot information, client information will not get updated.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getConnectedClientsname

getConnectedClients()

dessIndent
Returns an array of JSClientInformation elements describing the clients connected to the server. Note this is snapshot information on connected clients, client information will not get updated.
ret

Returns

sIndent JSClientInformation[]
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getConnectedClientsname

getConnectedClients(clientInfoFilter)

dessIndent
/*
Returns an array of JSClientInformation elements describing the clients connected to the server filtered by the a client info string.
This way you can ask for a specific set of clients that have a specific information added to there client information.
Note this is snapshot information on connected clients, client information will not get updated.
prs

Parameters

sIndentclientInfoFilterThe filter string
ret

Returns

sIndent JSClientInformation[]
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getLockedByClientname

getLockedByClient(datasource, pks)

dessIndent
Get client that locked the record from a specific datasource or null if record is not locked.
prs

Parameters

sIndentdatasource ;pks ;
ret

Returns

sIndent Client information
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getLocksname

getLocks()

dessIndent
Get a dataset will all locks on the server. The dataset will have four columns: datasource, acquireDate, clientId, pkHash.
	Each row in the dataset will be a lock.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isInMaintenanceModename

isInMaintenanceMode()

dessIndent
Returns true if the server is in maintenance mode, false otherwise.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
releaseLocksname

releaseLocks(clientId)

dessIndent
Release all locks acquired by a client

WARNING: use with care
prs

Parameters

sIndentclientId ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sendMessageToAllClientsname

sendMessageToAllClients(message)

dessIndent
Sends a message to all connected clients.
prs

Parameters

sIndentmessage ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sendMessageToClientname

sendMessageToClient(clientId, message)

dessIndent
Sends a message to a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method.
prs

Parameters

sIndentclientId ;message ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
shutDownAllClientsname

shutDownAllClients()

dessIndent
Shuts down all connected clients. This method returns immediately, it does not wait until the client shuts down.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
shutDownClientname

shutDownClient(clientId)

dessIndent
Shuts down a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. This method returns immediately, it does not wait until the client shuts down.
prs

Parameters

sIndentclientId ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
shutDownClientname

shutDownClient(clientId, forceUnregister)

dessIndent
Shuts down a specific client, identified by its clientId. The clientIds are retrieved by calling the getConnectedClients method. This method returns immediately, it does not wait until the client shuts down.
If forceUnregister is true, the client will unregister itself from server. Beware this should be used only if you are sure client is already closed (cannot connect anymore)
prs

Parameters

sIndentclientId ;forceUnregisterclient is forced to unregister from server
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow