Ila

org.topoweb.ila
Class IncommunicadoState

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

public class IncommunicadoState
extends VisitedState

The respresentation of the state of a node that cannot be visited due to some sort of network error. Generally, instances of this class have either NF or NK status. Application-specific errors are not encapsulated by this class (e.g. a 5xx class HTTP error code); rather, this class represents an error resulting from the unreachability of the application (e.g. a DNS or routing error).

TO DO: define error codes as interface constants

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
IncommunicadoState(int status, int versionId, long versionTimestamp, int syncVersionId, long syncVersionTimestamp, int forelinkCount, int coForelinkCount, long backlinkCount, long coBacklinkCount, java.lang.String userAgent, int errorCode)
          Creates a new instance using the given error code.
 
Method Summary
 int getErrorCode()
          Returns the error code.
 
Methods inherited from class org.topoweb.ila.VisitedState
getUserAgent
 
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

IncommunicadoState

public IncommunicadoState(int status,
                          int versionId,
                          long versionTimestamp,
                          int syncVersionId,
                          long syncVersionTimestamp,
                          int forelinkCount,
                          int coForelinkCount,
                          long backlinkCount,
                          long coBacklinkCount,
                          java.lang.String userAgent,
                          int errorCode)
                   throws java.lang.IllegalArgumentException
Creates a new instance using the given error code.

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
errorCode - the error code
userAgent - the user-agent that attempted the visit
Throws:
java.lang.IllegalArgumentException -
if the super constructor throws it;
if the errorCode is not undefined
See Also:
VisitedState.VisitedState(int,int,long,int,long,int,int,long,long,String)
Method Detail

getErrorCode

public final int getErrorCode()
Returns the error code.


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.