PageBoxLib
Class TokenTest

java.lang.Object
  extended byPageBoxLib.TokenTest

public class TokenTest
extends java.lang.Object

Test of the Token errors.

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2002-2004 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library 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 Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 1, 1
Author:
Alexis Grandemange

Field Summary
(package private) static int ERROR
          toFrameSend return code: return error
private  java.io.File f
          File handle on tokentest.txt
(package private) static int FORWARD
          toFrameSend return code: normal
private  Log log
          Logging object
(package private) static int NOTFORWARD
          toFrameSend return code: do not forward the frame to the next station
private  java.lang.String workDir
          Directory where repotest.txt is defined
 
Constructor Summary
(package private) TokenTest(java.lang.String workDir, Log log)
          Constructor.
 
Method Summary
(package private)  int toFrameSend()
          Returns how frameSend should be processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORWARD

static final int FORWARD
toFrameSend return code: normal

See Also:
Constant Field Values

ERROR

static final int ERROR
toFrameSend return code: return error

See Also:
Constant Field Values

NOTFORWARD

static final int NOTFORWARD
toFrameSend return code: do not forward the frame to the next station

See Also:
Constant Field Values

workDir

private java.lang.String workDir
Directory where repotest.txt is defined


log

private Log log
Logging object


f

private java.io.File f
File handle on tokentest.txt

Constructor Detail

TokenTest

TokenTest(java.lang.String workDir,
          Log log)
Constructor. Initializes homonymous member variables. Read tokentest file.

Parameters:
workDir - directory where tokentest.txt is defined
log - logging object
Method Detail

toFrameSend

int toFrameSend()
Returns how frameSend should be processed. Called by TokenImpl.

Returns:
FORWARD if frameSend should process the frame, ERROR if frameSend should return an error, NOTFORWARD if frameSend should not process the frame or the time to wait in seconds.