public interface MainUI
role
field must reference a String
with the value
"net.jini.lookup.ui.MainUI"
.
The first parameter of any factory method declared in a UI factory type is an
object called the "role object."
Any factory method that produces an Main UI must accept as the role object the
service item (the net.jini.core.lookup.ServiceItem
) of the service
with which the Main UI is associated.
Main UIs should allow clients to configure them before they
begin. For example, Main UIs produced by FrameFactory
,
JFrameFactory
, WindowFactory
and JWindowFactory
(all members of the net.jini.lookup.ui.factory
package)
should not be visible when they are returned from the factory method. This allows clients to set
the UI's position and size, for example, before making the UI
visible by invoking setVisible(true)
on the UI.
A client should be able to invoke a Main UI factory method multiple times sequentially. In other words, if a user uses a service via a Main UI, then says exit, then double clicks once again on the service icon, the client can just simply invoke a UI factory method again, and get another Main UI for the same service. Main UIs, therefore, should be written so that they work no matter what state the service object happens to be in when the Main UI is created.
It is recommended that clients use multiple Main UIs for the same service only sequentially, and avoid creating multiple Main UIs for the same service that operate concurrently with one another. But because some clients may create and use multiple Main UIs at the same time for the same service, providers of services and main UIs should program defensively, to ensure that multiple Main UIs for the same service at the same time will all work together concurrently.
static final String ROLE
role
field of UIDescriptor
s for MainUI role UIs.
The value of this constant is "net.jini.lookup.ui.MainUI"
.Copyright © 2016–2018. All rights reserved.