Ila

org.topoweb.ila.server.spi
Interface Mirror

All Superinterfaces:
NodeConstants
All Known Subinterfaces:
LocalMirror
All Known Implementing Classes:
MirrorImpl, RemoteMirror

public interface Mirror
extends NodeConstants

Interface through which link and state information is exchanged across the system. This is a privileged interface. Mirror instances typically come in 2 flavors; local and remote. The remote version is to be exposed as a protected network service.

The 2 methods in this interface involve pairs of nodes representing links. These are of the general form

      <source node> [<link type>] <destination node>
 
The semantics of the source and destination node is understood to be from the perspective of the callee, not the caller.

Neural Information Conduit

You can think of this interface as an information conduit across linked Node instances. The information exchange is analogous to a neural network because, by design, we are allowing (indeed requiring) that the state of any source node be updated as a result of a method invocation.

Author:
Babak Farhang

Field Summary
 
Fields inherited from interface org.topoweb.ila.NodeConstants
BACK, FIRST_PAGE, FORE, LAST_PAGE, LINK_MASK, PAGE_MASK
 
Method Summary
 void removeBacklink(org.topoweb.net.Ori src, Node dtn)
          Removes the specified backlink.
 Node setLink(org.topoweb.net.Ori src, int type, Node dtn)
          Sets a link of the specified type from the given source to destination node.
 

Method Detail

setLink

public Node setLink(org.topoweb.net.Ori src,
                    int type,
                    Node dtn)
             throws IlaException
Sets a link of the specified type from the given source to destination node. The caller is the authority on the destination node (dtn) and passes in state information about that node; the callee is the authority on the source node (src) and returns state information about the source. The callee typically updates state information about the src node (as a result of the invocation), as well as updating link entries before returning the src node.

Parameters:
src - the ORI of the source node
type - the link type (either FORE or BACK)
dtn - information about the destination node
Returns:
a Node instance encapsulating authoritative knowledge about the state of the specified src node
Throws:
IlaException - if an error occurs

removeBacklink

public void removeBacklink(org.topoweb.net.Ori src,
                           Node dtn)
                    throws IlaException
Removes the specified backlink. Backlinks are removed when the destination node (dtn) no longer points to (no longer has a forelink to) to the source node (src).

Note

If the semantics of this seems confusing, recall that methods in this interface are named from the perspective of the callee, not the caller. It is the caller who is the authority on the dtn node and who knows that it no longer points to the src. Also, recall that we are removing a backlink, not a forelink: the forelink is handled directly by the callee.

Parameters:
src - the ORI of the source node
dtn - information about the destination node
Throws:
IlaException - if an error occurs

Ila

Copyright (C) 2002 Babak Farhang

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.