com.wilko.jaim
Class GenericTocResponse

java.lang.Object
  |
  +--com.wilko.jaim.TocResponse
        |
        +--com.wilko.jaim.GenericTocResponse
All Implemented Interfaces:
TocResponseHandler

public class GenericTocResponse
extends TocResponse
implements TocResponseHandler

A GenericTocResponse is used internally in the Response parsing and processing logic of JaimConnection

Version:
$Revision: 1.5 $
Author:
paulw

Field Summary
 
Fields inherited from class com.wilko.jaim.TocResponse
cmd
 
Constructor Summary
GenericTocResponse()
          Creates new GenericTocCommand
 
Method Summary
 boolean canHandle(java.lang.String Response)
          Returns true if this response handler can handle the specified response.
 byte[] getBytes()
          Get a byte array that contains the response
 java.lang.String getResponseType()
          Used in the response dispatching process
 TocResponse parseString(java.lang.String str)
          Parse an incoming string
 java.lang.String toString()
          Convert this response to a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericTocResponse

public GenericTocResponse()
Creates new GenericTocCommand

Method Detail

parseString

public TocResponse parseString(java.lang.String str)
Parse an incoming string

Specified by:
parseString in interface TocResponseHandler
Parameters:
str - The response string to be parsed
Returns:
- A TocResponse object that represents this response

getBytes

public byte[] getBytes()
Get a byte array that contains the response

Returns:
The response as an array of bytes

toString

public java.lang.String toString()
Convert this response to a string

Overrides:
toString in class TocResponse
Returns:
The response as a string

getResponseType

public java.lang.String getResponseType()
Used in the response dispatching process

Specified by:
getResponseType in class TocResponse
Returns:
The respnse type

canHandle

public boolean canHandle(java.lang.String Response)
Returns true if this response handler can handle the specified response.

Specified by:
canHandle in interface TocResponseHandler
Parameters:
Response - - the response string from TOC. This is the part of the response before the first ':'
Returns:
true if the response can be handled

jaimlib.sourceforge.net