Ila

org.topoweb.ila
Class VisitedState

java.lang.Object
  |
  +--org.topoweb.ila.State
        |
        +--org.topoweb.ila.VisitedState
All Implemented Interfaces:
NodeConstants, StateConstants
Direct Known Subclasses:
HttpState, IncommunicadoState

public abstract class VisitedState
extends State

The respresentation of the state of a node that has been visited. Here, visited means that an agent has attempted to test the existence, parse the contents, etc. of a node. Instances of this class cannot have NV status.

Author:
Babak Farhang

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
protected VisitedState(int status, int versionId, long versionTimestamp, int syncVersionId, long syncVersionTimestamp, int forelinkCount, int coForelinkCount, long backlinkCount, long coBacklinkCount, java.lang.String userAgent)
          Creates a new instance using the given user-agent.
 
Method Summary
 java.lang.String getUserAgent()
          Returns the user-agent that attempted to visit the node.
 
Methods inherited from class org.topoweb.ila.State
getCoLinkCount, getLinkCount, getStatus, getSyncVersionId, getSyncVersionTimestamp, getVersionId, getVersionTimestamp, statusToString, supercedes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisitedState

protected VisitedState(int status,
                       int versionId,
                       long versionTimestamp,
                       int syncVersionId,
                       long syncVersionTimestamp,
                       int forelinkCount,
                       int coForelinkCount,
                       long backlinkCount,
                       long coBacklinkCount,
                       java.lang.String userAgent)
                throws java.lang.IllegalArgumentException
Creates a new instance using the given user-agent.

Parameters:
status - the status, as defined by StateConstants
versionId - the version ID
versionTimestamp - the version timestamp
syncVersionId - the sync version ID
syncVersionTimestamp - the sync version timestamp
forelinkCount - the total number of forelinks
coForelinkCount - the total number of co--forelinks
backlinkCount - the total number of backlinks
coBacklinkCount - the total number of co-backlinks
userAgent - the user-agent that attempted the visit
Throws:
java.lang.IllegalArgumentException -
if the super constructor throws it;
if status is not NK | NF | OK ;
if userAgent is null
See Also:
State.State(int,int,long,int,long,int,int,long,long)
Method Detail

getUserAgent

public final java.lang.String getUserAgent()
Returns the user-agent that attempted to visit the node.

Returns:
the user-agent (never null)

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.