blob: 5f896c39ab9f0db83c0547f0c483d69764564599 [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@startuml
box client process
participant Watcher
control WatcherThread
participant Fw
participant mDNS_daemon
end box
Watcher->Fw:Register endpoint listener service tracker.\n(filter:"(!(DISCOVERY=true))")
create WatcherThread
Watcher ->WatcherThread:
==setup==
loop
alt mDNS server disconnect
WatcherThread->mDNS_daemon:DNSServiceCreateConnection
return DNSServiceRef
end alt
alt browser is null
WatcherThread->mDNS_daemon:DNSServiceBrowse(DNSServiceRef,anyInterface, "_celix-rpc._udp", "local"...)
end alt
mDNS_daemon-->WatcherThread:Service instances browsed
alt Have new service instance \n or resolve service timeout
WatcherThread->mDNS_daemon:DNSServiceResolve
end
mDNS_daemon-->WatcherThread:txt records
WatcherThread->WatcherThread:Converting txt records to endpoint properties
alt resolve completed
WatcherThread->WatcherThread:Inform new endpoints to tpm (use endpoint listener service)
end alt
WatcherThread->WatcherThread:Remove expired endpoints(use endpoint listener service)
note left
If the service has been deleted for 10 seconds,
we consider the endpoint to be expired.
end note
end loop
@enduml