Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Open Simulator Technical Help
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenSimulator Internals/Connector Architecture/Presence Connector
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= OpenSimulator Internals/Connector Architecture/Presence Connector = == Overview == PresenceServicesConnector is the simulator-side remote connector for IPresenceService. It translates IPresenceService calls into HTTP POST requests to the ROBUST Presence handler at /presence. Source file: OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs ---- === Initialisation === Config section: [PresenceService] Required key: * PresenceServerURI -- URL of the ROBUST Presence endpoint; throws if missing Base class BaseServiceConnector.Initialise() called for auth setup. Three constructors: * Default (no args) -- URI must be set externally * String URI -- used by callers that pass the URI directly * IConfigSource -- calls Initialise(), normal grid mode ---- === Transport === All methods POST to m_ServerURI + "/presence" using SynchronousRestFormsRequester. All requests include: * VERSIONMIN / VERSIONMAX -- protocol version negotiation * METHOD -- identifies the operation Success detection for login/logout/report methods: * LoginAgent, LogoutAgent, LogoutRegionAgents: scan raw reply string for "success" (case-insensitive substring search -- not XML parse) * ReportAgent: parses XML response, checks result field == "success" * All return false on empty reply or exception ---- === Methods === {| class="wikitable" ! Method !! METHOD field !! Fields sent !! Returns |- | LoginAgent(userID, sessionID, secureSessionID) || "login" || UserID, SessionID, SecureSessionID || bool |- | LogoutAgent(sessionID) || "logout" || SessionID || bool |- | LogoutRegionAgents(regionID) || "logoutregion" || RegionID || bool |- | ReportAgent(sessionID, regionID) || "report" || SessionID, RegionID || bool |- | GetAgent(sessionID) || "getagent" || SessionID || PresenceInfo or null |- | GetAgents(string[] userIDs) || "getagents" || uuids (List<string>) || PresenceInfo[] or null |} GetAgent(): * Parses XML response * Returns PresenceInfo constructed from result dictionary * Returns null if result == "null", reply is empty, or result is not a dictionary GetAgents(): * Sends userIDs as uuids key (List<string>) * Iterates all values in reply dictionary, constructs PresenceInfo for each dictionary entry * Returns empty array if result == "null" or "Failure" * Returns null on empty reply or exception ---- === Notes === * LoginAgent, LogoutAgent, and LogoutRegionAgents use raw string search for "success" rather than XML parsing -- different from ReportAgent which parses XML. This is inconsistent within the same file. * ScopeID fields are present in the code but commented out throughout. ---- == See Also == * [[OpenSimulator Internals/Connector Architecture]] * [[OpenSimulator Internals/Code Map/ROBUST/PresenceService]] * [[OpenSimulator Internals/Code Map/Shared]]
Summary:
Please note that all contributions to Open Simulator Technical Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Open Simulator Technical Help:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OpenSimulator Internals/Connector Architecture/Presence Connector
(section)
Add topic