All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.client.Z39init

java.lang.Object
   |
   +----ORG.oclc.z39.client.Z39init

public class Z39init
extends Object
Z39init creates InitRequests and translates InitResponses.

Version:
@(#)Z39init.java 1.1 07/09/97

Variable Index

 o DBList
Array of available DatabaseNames.
 o DisplayDBList
 o failureCode
Reason InitRequest failed.
 o maximumRecordSize
Override of preferredMessageSize for retrieval of exceptionally large records.
 o MessageOfTheDay
String containing message from Z39.50 server.
 o options
Negotiates whether specific features are available.
 o preferredMessageSize
Preferred maximum size in bytes of responses to a PresentRequest.
 o referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.
 o result
'Accept' or 'Reject'.
 o zsession
Z39session

Constructor Index

 o Z39init()
 o Z39init(Z39session)

Method Index

 o doInit(int, String, int, int, String, String, String, DataDir)
Creates, sends, and parses the response for a Z39.50 Init.
 o getFailureMsg()
 o Request(int, String, int, int, String, String, String, DataDir)
Creates a Z39.50 InitRequest.
 o Request(int, String, int, int, String, String, String, DataDir, int, int)
Creates a Z39.50 InitRequest.
 o Response(BerString)
Processes a Z39.50 InitResponse.
 o Response(DataDir)
Processes a Z39.50 InitResponse.
 o toString()

Variables

 o referenceId
 public int referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.

 o options
 public String options
Negotiates whether specific features are available. See Z39.50 Specification.

 o preferredMessageSize
 public int preferredMessageSize
Preferred maximum size in bytes of responses to a PresentRequest. See Z39.50 Specification.

 o maximumRecordSize
 public int maximumRecordSize
Override of preferredMessageSize for retrieval of exceptionally large records. See Z39.50 Specification.

 o result
 public short result
'Accept' or 'Reject'. See Z39.50 Specification.

 o MessageOfTheDay
 public String MessageOfTheDay
String containing message from Z39.50 server.

 o DBList
 public String DBList[]
Array of available DatabaseNames.

 o DisplayDBList
 public String DisplayDBList[]
 o failureCode
 public short failureCode
Reason InitRequest failed.

 o zsession
 public Z39session zsession
Z39session

Constructors

 o Z39init
 public Z39init()
 o Z39init
 public Z39init(Z39session z)

Methods

 o doInit
 public boolean doInit(int referenceId,
                       String options,
                       int preferredMessageSize,
                       int maximumRecordSize,
                       String id,
                       String password,
                       String newpassword,
                       DataDir userInformationField) throws Exception
Creates, sends, and parses the response for a Z39.50 Init.

Parameters:
referenceId - Will be returned on Response and allows Requests and responses to be matched up by the application.
options - See Z39.50 Specification.
preferredMessageSize - See Z39.50 Specification.
maximumRecordSize - See Z39.50 Specification.
id - use null for anonymous access
password - use null for anonymous access
newpassword - See Z39.50 Specification.
userInformationField - See Z39.50 Specification.
Returns:
boolean indicating success of failure of request
Throws: Exception
caught from Z39Connect classes trying to send/receive the message
 o Request
 public BerString Request(int referenceId,
                          String options,
                          int preferredMessageSize,
                          int maximumRecordSize,
                          String id,
                          String password,
                          String newpassword,
                          DataDir userInformationField)
Creates a Z39.50 InitRequest.

Parameters:
referenceId - Will be returned on Response and allows Requests and responses to be matched up by the application.
options - See Z39.50 Specification.
preferredMessageSize - See Z39.50 Specification.
maximumRecordSize - See Z39.50 Specification.
id - use null for anonymous access
password - use null for anonymous access
newpassword - See Z39.50 Specification.
userInformationField - See Z39.50 Specification.
Returns:
BerString containing Request or null if space was unavailable
 o Request
 public BerString Request(int referenceId,
                          String options,
                          int preferredMessageSize,
                          int maximumRecordSize,
                          String id,
                          String password,
                          String newpassword,
                          DataDir userInformationField,
                          int extraLen,
                          int offset)
Creates a Z39.50 InitRequest.

Parameters:
referenceId - Will be returned on Response and allows Requests and responses to be matched up by the application.
options - See Z39.50 Specification.
preferredMessageSize - See Z39.50 Specification.
maximumRecordSize - See Z39.50 Specification.
id - use null for anonymous access
password - use null for anonymous access
newpassword - See Z39.50 Specification.
userInformationField - See Z39.50 Specification.
extraLen - Allow this much extra room in the built BER record.
offset - Build the Request at this offset in the BerString
Returns:
BerString containing Request or null if space was unavailable
 o Response
 public void Response(BerString response)
Processes a Z39.50 InitResponse.

Parameters:
response - BerString containing response.
 o Response
 public void Response(DataDir response)
Processes a Z39.50 InitResponse.

Parameters:
response - DataDir containing response
 o getFailureMsg
 public String getFailureMsg()
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index