edu.uiuc.cs.net.DPRPManager
Class DPRPErrors

java.lang.Object
  |
  +--edu.uiuc.cs.net.DPRPManager.DPRPErrors

public abstract class DPRPErrors
extends java.lang.Object

This abstract class represents all of the possible error messages that can be transmitted during the course of DPRP operations. Essentailly, this boils down to a bunch of constant variables, and a method that converts a number to a string. Ain't progress wonderful?

Version:
1.3 - October 26th, 2001
Author:
Andy Reitz (areitz@cs.uiuc.edu)

Field Summary
static short CLI_ACQUIRE_ERROR
          A generic error occured whilst trying to acquire the first lease.
static short CLI_ACQUIRE_SUCCESS
          Acquiring the first lease occured without error.
static short CLI_ERROR
          Client session errorful event responses.
static short CLI_INTERNAL_ERROR
          Client tried to sleep for an invalid time (negative).
static short CLI_SERVER_NACK_ERROR
          The server NACK'd an update request.
static short CLI_SRV_NO_RESPOND
          The server didn't respond to repeated lease renew requests.
static short CLI_SUCCESS
          Client session succesful event responses.
static short CLI_T2_EXPIRED
          The t2 timer expired without getting a valid lease renewal.
static short CLI_UPDATE_ERROR
          A server error occured whilst trying to perform an update.
static short CLI_UPDATE_SUCCESS
          A lease update was performed without error.
static short CLIENT_DENIED
          The client isn't allowed to connect, by rule of the host security configuration file.
static short CLIENT_LEASE_NOT_FOUND
          Lease couldn't be renewed, because there was no record of it on the server's end.
static short CLIENT_LEASE_NOT_RENEWED
          This error is rather silly -- it's used internally in the client, in order to pass a NACK server response from one method to another (because we're passing lease objects around, not messages).
static short CLIENT_NOT_ALLOWED_RENEW
          Client barred from renewing, by configuration rule.
static short CLIENT_RANGE_DENIED
          Requested port cannot be allocated, due to limited range allowed by server rule.
static short INVALID_DURATION_SPECIFIED
          Duration specified by client was invalid (negative, or goes against configuration rule).
static short INVALID_PACKET_CONTENTS
          Values specified in the packet were found to be invalid (negative ports, and such).
static short INVALID_PACKET_FMT
          The message didn't decode properly -- i.e.
static short INVALID_PACKET_TYPE
          The messageType specified in the packet didn't jive with what was expected.
static short INVALID_PROTOCOL
          Protocol specified wasn't TCP or UDP.
static short INVALID_XID_RECEIVED
          The XID field in the received message wasn't for the session, so the controller must be notified.
static short INVALID_XID_SENT
          The XID field in the sent-out message wasn't valid for the session.
static short NO_FREE_PORTS
          Server doesn't have any free ports to allocate; Client should retry later.
static short NUM_RENEWS_EXCEEDED
          Client barred from renewing, because the number of lease renewals was exceeded (set by configuration rule).
static short PORT_ALLOCATION_ERROR
          The server had some (unknown to the client) problem in reserving an external port.
static short UNKNOWN_ERROR
          When an error happens, and you don't know who to call.
static short YOU_SENT_INVALID_PKT_FMT
          Notifies sender that they are having a problem assembling packets for transmission.
 
Constructor Summary
DPRPErrors()
           
 
Method Summary
static java.lang.String getErrorStr(short errorcode)
          Gets the raw string representation of the error, without any junk postfixed to it.
static java.lang.String resolveError(short errorcode)
          This method resolves a specific error into a human-readable string.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

UNKNOWN_ERROR

public static final short UNKNOWN_ERROR
When an error happens, and you don't know who to call.

NO_FREE_PORTS

public static final short NO_FREE_PORTS
Server doesn't have any free ports to allocate; Client should retry later.

CLIENT_DENIED

public static final short CLIENT_DENIED
The client isn't allowed to connect, by rule of the host security configuration file. Contact the administrator.

CLIENT_RANGE_DENIED

public static final short CLIENT_RANGE_DENIED
Requested port cannot be allocated, due to limited range allowed by server rule.

INVALID_PACKET_TYPE

public static final short INVALID_PACKET_TYPE
The messageType specified in the packet didn't jive with what was expected.

INVALID_XID_SENT

public static final short INVALID_XID_SENT
The XID field in the sent-out message wasn't valid for the session.

INVALID_XID_RECEIVED

public static final short INVALID_XID_RECEIVED
The XID field in the received message wasn't for the session, so the controller must be notified.

INVALID_PACKET_FMT

public static final short INVALID_PACKET_FMT
The message didn't decode properly -- i.e. the message was totally corrupted.

INVALID_PROTOCOL

public static final short INVALID_PROTOCOL
Protocol specified wasn't TCP or UDP.

INVALID_PACKET_CONTENTS

public static final short INVALID_PACKET_CONTENTS
Values specified in the packet were found to be invalid (negative ports, and such).

YOU_SENT_INVALID_PKT_FMT

public static final short YOU_SENT_INVALID_PKT_FMT
Notifies sender that they are having a problem assembling packets for transmission.

CLIENT_LEASE_NOT_RENEWED

public static final short CLIENT_LEASE_NOT_RENEWED
This error is rather silly -- it's used internally in the client, in order to pass a NACK server response from one method to another (because we're passing lease objects around, not messages).

CLIENT_LEASE_NOT_FOUND

public static final short CLIENT_LEASE_NOT_FOUND
Lease couldn't be renewed, because there was no record of it on the server's end.

CLIENT_NOT_ALLOWED_RENEW

public static final short CLIENT_NOT_ALLOWED_RENEW
Client barred from renewing, by configuration rule.

NUM_RENEWS_EXCEEDED

public static final short NUM_RENEWS_EXCEEDED
Client barred from renewing, because the number of lease renewals was exceeded (set by configuration rule).

INVALID_DURATION_SPECIFIED

public static final short INVALID_DURATION_SPECIFIED
Duration specified by client was invalid (negative, or goes against configuration rule).

PORT_ALLOCATION_ERROR

public static final short PORT_ALLOCATION_ERROR
The server had some (unknown to the client) problem in reserving an external port. This error might be retry-able.

CLI_SUCCESS

public static final short CLI_SUCCESS
Client session succesful event responses.

CLI_UPDATE_SUCCESS

public static final short CLI_UPDATE_SUCCESS
A lease update was performed without error.

CLI_ACQUIRE_SUCCESS

public static final short CLI_ACQUIRE_SUCCESS
Acquiring the first lease occured without error.

CLI_ERROR

public static final short CLI_ERROR
Client session errorful event responses.

CLI_SERVER_NACK_ERROR

public static final short CLI_SERVER_NACK_ERROR
The server NACK'd an update request.

CLI_ACQUIRE_ERROR

public static final short CLI_ACQUIRE_ERROR
A generic error occured whilst trying to acquire the first lease. This means that the server probably didn't respond.

CLI_UPDATE_ERROR

public static final short CLI_UPDATE_ERROR
A server error occured whilst trying to perform an update.

CLI_T2_EXPIRED

public static final short CLI_T2_EXPIRED
The t2 timer expired without getting a valid lease renewal.

CLI_SRV_NO_RESPOND

public static final short CLI_SRV_NO_RESPOND
The server didn't respond to repeated lease renew requests.

CLI_INTERNAL_ERROR

public static final short CLI_INTERNAL_ERROR
Client tried to sleep for an invalid time (negative).
Constructor Detail

DPRPErrors

public DPRPErrors()
Method Detail

resolveError

public static java.lang.String resolveError(short errorcode)
This method resolves a specific error into a human-readable string. The returned string will have "Errorcode(#): " prepended to it.
Parameters:
errorcode - A error number, to be resolved.
Returns:
A complete human-readable string representation of the error.

getErrorStr

public static java.lang.String getErrorStr(short errorcode)
Gets the raw string representation of the error, without any junk postfixed to it.
Parameters:
errorcode - A error number, to be resolved.
Returns:
The raw human-readable string representation of the error.