Ila

org.topoweb.ila.server.spi
Class RegistrarImpl

java.lang.Object
  |
  +--org.topoweb.ila.server.spi.RegistrarImpl
All Implemented Interfaces:
NodeConstants, Registrar, StateConstants

public class RegistrarImpl
extends java.lang.Object
implements Registrar, StateConstants, NodeConstants

Base local Registrar implementation class. This class throws the following more specific IlaExceptions:

Author:
Babak Farhang
See Also:
DataAccessor

Field Summary
 
Fields inherited from interface org.topoweb.ila.StateConstants
NF, NK, NV, OK
 
Fields inherited from interface org.topoweb.ila.NodeConstants
BACK, FIRST_PAGE, FORE, LAST_PAGE, LINK_MASK, PAGE_MASK
 
Constructor Summary
RegistrarImpl(DataAccessor db, ServiceProviderResolver resolver, CoLinkPolicy colinkPolicy)
          Creates a new instance with the given data accessor and co-link policy.
 
Method Summary
 LinkNode register(LinkNode node)
          Registers the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrarImpl

public RegistrarImpl(DataAccessor db,
                     ServiceProviderResolver resolver,
                     CoLinkPolicy colinkPolicy)
Creates a new instance with the given data accessor and co-link policy. The resolver is used to ensure that the implementation is the authority server for any given src ORI.

Parameters:
db - a data accessor implementation
resolver - the service resolver (used to do sanity checks on the arguments)
colinkPolicy - a co-link policy implementation
Method Detail

register

public LinkNode register(LinkNode node)
                  throws ResolutionException,
                         DataAccessorException,
                         IlaException
Description copied from interface: Registrar
Registers the given node. The node's forelinks inherit backlinks to the given node; if any forelinks have been removed, then their corresponding backlinks are scheduled for removal. The State of the node is updated and returned.

The states of the node's forelinks (as known by the system) are returned on a best efforts basis; if the state of any of the node's forelinks cannot be ascertained immediately, then they are returned in the NF state.

Specified by:
register in interface Registrar
Parameters:
node - the node encapsulating information parsed by a trusted bot
Returns:
a LinkNode instance encapsulating the state of knowledge about the given node at this moment in time
Throws:
ResolutionException - if this server is not the authority on the given node
DataAccessorException - if the underlying data accessor throws it
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.