All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class uhr.core.attract.Linker

java.lang.Object
   |
   +----uhr.core.attract.Linker

public class Linker
extends Object
implements ServiceHost, UF_void_Flexitron_Container
This handles "manual" links between ServiceClients and Hosts. Currently it has only linkClientHost(...). Later it will have an unlink, to allow containerDK to be dynamically edited.


Constructor Index

 o Linker()

Method Index

 o act(Flexitron, Container)
This uniface is redirected to linkClientHost(...).
 o getServiceHostAide()
Returns the aide handling the ServiceHost's attractor work.
 o linkClientHost(Flexitron, Container)
Links the service client to the service host, using the arguments.

Constructors

 o Linker
 public Linker()

Methods

 o getServiceHostAide
 public ServiceHostAide getServiceHostAide()
Returns the aide handling the ServiceHost's attractor work. My ServiceItems are:
   Type:      uhr.uniface.UF_void_Flexitron_Container
   ServiceID: uhr.core.attract.LinkClientHost
 

Returns:
the aide.
 o act
 public void act(Flexitron tron,
                 Container container)
This uniface is redirected to linkClientHost(...).

Parameters:
linkDef - the DK defining the manual link.
container - the container the client and host parts are in.
 o linkClientHost
 public void linkClientHost(Flexitron linkDef,
                            Container container)
Links the service client to the service host, using the arguments. The linkDef DK must be of the format:
TestClient
Warehouses
uhr.uniface.UF_void


ServiceID
test.TestServiceA


 
*** TODO *** Allow multiple types per recent mod to Attractor. - JH

The client or host must be part names in the container, and must implement the appropriate interface, ServiceClient or ServiceHost, and each have or need the serviceid. The client must be a leaf. The host may be a leaf or subcell (container).

If the host is a subcell, this is a "downward" link, which is rare. Due to the design complexities of immediate downward links, we currently support only deferred downward links.

If this is a downward deferred link then the ClientNeed will have its ServiceSource set, allowing the need to be satisfied later. When such a deferred downward link is satisfied later, if the subcell is not yet started, it is automatically started. In this manner a System Tree can grow as needed, without any extra work for domain parts.

We may support addtional kinds of manual links later. However these appear to introduce complexities fraught with defect potential, and so we do not support them now. There are a total of 7 leaf/subcell/supercell link permutations. We support only 2 presently. Here's the list of link types:

   Direction  Client     Host
      0       leaf      leaf    (supported)
      -       leaf      subcell (supported)
      +       subcell   leaf
      +       leaf      supercell
      -       supercell leaf
      --      supercell subcell
      ++      subcell   supercell
 

Parameters:
linkDef - the DK defining the manual link.
container - the container the client and host parts are in.
Throws: IllegalStateException
if client or host not found, or if client or host do not implement ServcieClient and ServiceHost, or the client and host do not have the serviceid in the linkDef, or if the need is already satisfied, or a downward link is immediate, or the client is a container, or an immediate link is not a match.

All Packages  Class Hierarchy  This Package  Previous  Next  Index