Ila

org.topoweb.ila.protocol
Class RemoteRegistrar

java.lang.Object
  |
  +--org.topoweb.ila.protocol.RemoteService
        |
        +--org.topoweb.ila.protocol.RemoteRegistrar
All Implemented Interfaces:
ProtocolConstants, Registrar, SpiProtocolConstants

public class RemoteRegistrar
extends RemoteService
implements Registrar, SpiProtocolConstants

Registrar implementation over an XML/DOM protocol. This is a client-side interface implementation.

Author:
Babak Farhang

Field Summary
 
Fields inherited from interface org.topoweb.ila.protocol.SpiProtocolConstants
SPC_REGISTER, SPC_REMOVE_BACKLINK, SPC_SET_LINK, SPC_SPI, SPC_SPI_NAMESPACE
 
Fields inherited from interface org.topoweb.ila.protocol.ProtocolConstants
PC_BACKLINK_COUNT, PC_BACKLINKS, PC_CO_BACKLINK_COUNT, PC_CO_FORELINK_COUNT, PC_CONTENT_LENGTH, PC_CONTENT_TYPE, PC_ERROR_CODE, PC_EXPIRATION, PC_FAIL, PC_FIRST, PC_FORELINK_COUNT, PC_FORELINKS, PC_GET_KNOWN, PC_GET_LINK_NODE, PC_GET_LINKS, PC_GET_NODE, PC_HI, PC_HTTP, PC_ID, PC_ILA, PC_INCOMMUNICADO, PC_LAST, PC_LAST_MODIFIED, PC_LINK_NODE, PC_LINK_TYPE, PC_LO, PC_MAX_COUNT, PC_NODE, PC_NODE_SET, PC_OKAY, PC_ORI, PC_PAGE, PC_REGISTER, PC_REQUEST, PC_RESPONSE, PC_SIZE, PC_STATE, PC_STATUS, PC_SYNC_VERSION_ID, PC_SYNC_VERSION_TIMESTAMP, PC_TITLE, PC_USER, PC_USER_AGENT, PC_USER_NAMESPACE, PC_VERSION, PC_VERSION_ID, PC_VERSION_TIMESTAMP
 
Constructor Summary
RemoteRegistrar(PLinkNode plinknode, org.topoweb.xml.DomProtocol phandler)
          Creates a new instance with the given entity translator and protocol handler.
 
Method Summary
 LinkNode register(LinkNode node)
          Registers the given node.
 
Methods inherited from class org.topoweb.ila.protocol.RemoteService
checkVersion, getAnswerElement, getVersion, newTransactionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRegistrar

public RemoteRegistrar(PLinkNode plinknode,
                       org.topoweb.xml.DomProtocol phandler)
                throws java.lang.IllegalArgumentException
Creates a new instance with the given entity translator and protocol handler. The protocol handler phandler encapsulates the network communication logic (e.g. server resolution, redirects, and so on).

Parameters:
plinknode - LinkNode protocol translator
phandler - the protocol handler that retrieves responses
Throws:
java.lang.IllegalArgumentException - if any of the parameters is null
Method Detail

register

public LinkNode register(LinkNode node)
                  throws 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:
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.