net.sf.dict4j.command
Class AbstractCommand
java.lang.Object
net.sf.dict4j.command.AbstractCommand
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- AbstractDataCommand, AuthCommand, ClientCommand, OptionCommand, QuitCommand, ShowDatabaseInfoCommand, StatusCommand
public abstract class AbstractCommand
- extends java.lang.Object
- implements Command
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
responseCode
protected int responseCode
responseStatus
protected java.lang.String responseStatus
AbstractCommand
public AbstractCommand()
send
public void send(DictTransport transport)
- Specified by:
send
in interface Command
receiveHeader
protected void receiveHeader(DictTransport transport)
checkResponseCodeForServerException
protected void checkResponseCodeForServerException(ResponseEnum responseEnum)
throws DictServerException
- Throws:
DictServerException
getResponseEnum
protected ResponseEnum getResponseEnum(int code,
ResponseEnum[] enums)
getResponseHeaderEnum
protected ResponseEnum getResponseHeaderEnum(int code)
parseResponseHeader
protected void parseResponseHeader(java.lang.String header)
parseResponse
protected void parseResponse(java.lang.String response)
stripQuotes
protected static java.lang.String stripQuotes(java.lang.String value)
getResponseHeaderCodes
protected abstract ResponseEnum[] getResponseHeaderCodes()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getString
protected abstract java.lang.String getString()
getResponseCode
public int getResponseCode()
- Specified by:
getResponseCode
in interface Command
getResponseStatus
public java.lang.String getResponseStatus()
- Specified by:
getResponseStatus
in interface Command