eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'NVTClient':

Home

everywhere
www.exept.de
for:
[back]

Class: NVTClient


Inheritance:

   Object
   |
   +--NVTClient
      |
      +--FTPClient
      |
      +--SMTPClient

Package:
stx:goodies/communication
Category:
Net-Communication-Support
Version:
rev: 1.19 date: 2005/05/11 14:59:35
user: cg
file: NVTClient.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger

Description:


Abstract superclass for Network Virtual Terminal protocol clients;
i.e. FTPCLient, SMTPClient, TelnetClient etc..


Related information:

    FTPClient
    appropriate
    RFC's

Class protocol:

Signal constants
o  commandErrorSignal
return the parent of all errors related to command execution

o  connectFailedSignal
return the parent of all errors related to connection setup

o  loginFailedSignal
return the signal raised if the login fails

o  netErrorSignal
return the parent of all net errors

o  timeoutErrorSignal
return the signal raised on response timeout

o  transmissionErrorSignal
return the parent signal related to all data transmission errors

o  unimplementedOperationErrorSignal
return the signal raised if some command is not implemented by
the partner (should not happen)

class initialization
o  initialize

debugging
o  verbose: aBoolean

instance creation
o  connectTo: host
open a connection to some host as anonymous user

o  new
return a new ftpClient instance


Instance protocol:

connection setup
o  connectTo: host
connect to some user as anonymous user

o  connectTo: host port: portNrOrNil user: user password: pw
connect to some host as some user

o  connectTo: host user: user
connect to some host as user

o  connectTo: host user: user password: pw
connect to some host as user

o  connectToHost: host
same as connectTo: - VW compatibility

o  connectionTimeout: millis
set timeout for establishing a connection. If the millis arg is nonNil, stop trying to
connect after that many milliseconds and raises an exception

defaults
o  defaultPassword

** This method raises an error - it must be redefined in concrete classes **

o  defaultPort

** This method raises an error - it must be redefined in concrete classes **

o  defaultUser

** This method raises an error - it must be redefined in concrete classes **

error handling
o  commandFailed

o  connectionFailed

o  errorStringFromResponse

o  loginFailed

o  responseTimeoutError

o  unimplementedOperationError

initialization
o  initialize

private - commands & responses
o  clearReplyPending

o  getResponse
wait for and read a response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric).
MultiLine responses are collected in responseLines.
Finally, handleReplyCode (redefinable) is asked to xlate from response code to
exception (if any)

o  getResponseHandlingReplyCodesWith: handleReplyCodeBlock
wait for and read a response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric).
MultiLine responses are collected in responseLines.
Finally, handleReplyCode (redefinable) is asked to xlate from response code to
exception (if any)

o  handleReplyCode: replyCode

o  sendCommand: aCommandString
send a command, wait for response.
Leaves result in lastResponse (ascii) and lastReplyCode (numeric)

o  sendCommandNoWait: aCommandString
send a command, do not wait for response.

o  sendLine: aLine
send a line with CRLF

private - connection setup
o  close
disconnect - if redefined (to send a BYE message), do not forget to
invoke me here as well

o  connection

o  doConnect
connect, using the previously defined userName, password and hostName

o  getInitialConnectResponse
invoked right after the socket connection has been setup;
subclass implementation should read all initial hello-bla

** This method raises an error - it must be redefined in concrete classes **

o  performLoginSequence
invoked after the socket connection has been setup and the initial
connect response blah has been read.
A subclass implementation should perform whatever login sequence has to be performed.

** This method raises an error - it must be redefined in concrete classes **

o  sendGoodByeCommand
invoked before the socket connection is shutDown.
A subclass implementation may want to redefine this for a graceful goodBy
(typically sending a quit-command)

queries
o  isConnected

unknown
o  userName: aString



ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 21:20:10 GMT