swpchat.client
Class FileConnection

java.lang.Object
  |
  +--swpchat.client.ServerConnection
        |
        +--swpchat.client.FileConnection
All Implemented Interfaces:
ChatTokens, ControlTokens, FileTransferTokens, ProtocolTokens, SenderReceiverTokens
Direct Known Subclasses:
FileProtocolHandler, FileSendConnection

public class FileConnection
extends ServerConnection
implements FileTransferTokens


Field Summary
private static java.lang.String CLS
           
 
Fields inherited from interface swpchat.protocol.FileTransferTokens
STR_SEND_FILE_REQUEST, STR_SEND_FILE_REQUEST_BEGIN, STR_SET_FILENAME, STR_SET_FILENAME_BEGIN, STR_SET_FILESIZE, STR_SET_FILESIZE_BEGIN
 
Fields inherited from interface swpchat.protocol.ChatTokens
CHAR_ARG_SEP, CHAR_MSG_END, CHAR_MSG_EOL, CHAR_QUOTE, CHAR_STRING_DELIMITER, STR_ARG_SEP, STR_AUTHORIZE, STR_MSG_END, STR_MSG_EOL, STR_NEG_ARG, STR_NEGATIVE, STR_POS_ARG, STR_POSITIVE, STR_QUOTE, STR_REPLY, STR_STRING_DELIMITER, STR_WAIT
 
Fields inherited from interface swpchat.protocol.SenderReceiverTokens
STR_JOIN, STR_JOINPASSWD, STR_LEAVE, STR_OFF, STR_ON, STR_PLAY, STR_PLAY_BEGIN, STR_PLAY_RE_BEGIN, STR_RECEIVE, STR_RECEIVE_BEGIN, STR_RECEIVE_USERINFO, STR_REQUEST_USERINFO, STR_SEND, STR_SEND_BEGIN, STR_SEND_RE_BEGIN, STR_SETTOPIC, STR_SETTOPIC_BEGIN, STR_SHIP, STR_SHIP_BEGIN, STR_TOPICCHANGED, STR_WHISPER, STR_WHISPRECEIVE
 
Fields inherited from interface swpchat.protocol.ControlTokens
STR_EMOTION, STR_LOGIN, STR_LOGIN_BEGIN, STR_LOGIN_RE_BEGIN, STR_LOGOUT, STR_LOGOUT_BEGIN, STR_LOGOUT_RE_BEGIN, STR_MEMBER, STR_MEMBER_BEGIN, STR_MEMBER_INFO, STR_MEMBER_JOIN, STR_MEMBER_LEAVE, STR_MEMBER_SHIP, STR_NEW_CHANNEL, STR_NOTIFICATION, STR_NOTIFICATION_BEGIN, STR_NOTIFY_REQUEST, STR_REMOVE_CHANNEL, STR_RENAME_CHANNEL, STR_REQUEST_IP, STR_REQUST_IP_RE_BEGIN, STR_SEND_USERINFO, STR_SET_NICK, STR_SET_NICK_BEGIN, STR_SET_NICK_RE_BEGIN, STR_SET_SESSIONKEY, STR_STOP_NOTIFICATION, STR_TELEPHONE_REQUEST
 
Fields inherited from interface swpchat.protocol.ProtocolTokens
STR_CONTROL, STR_CONTROL_PROTOCOL_ID, STR_FILE_SEND, STR_FILE_SEND_PROTOCOL_ID, STR_PROTOCOL, STR_PROTOCOL_ID_BEGIN, STR_RECEIVER, STR_RECEIVER_PROTOCOL_ID, STR_SENDER, STR_SENDER_PROTOCOL_ID
 
Constructor Summary
FileConnection()
           
 
Method Summary
protected  boolean isLogin(java.util.Vector tokenlist)
          Returns true, iff the tokenlist contains a valid Login command.
protected static boolean isLoginReply(java.util.Vector tokenlist)
          Returns true, iff the tokenlist contains a valid login command.
protected static boolean isSendFileRequest(java.util.Vector tokenlist)
          true, iff tokenlist contains valid sendFileRequest command.
protected static boolean isSendFileRequestReply(java.util.Vector tokenlist)
          true, iff tokenlist contains valid sendFileRequest command
protected static boolean isSetFileName(java.util.Vector tokenlist)
          true, iff tokenlist contains valid setFileName command
protected static boolean isSetFileNameReply(java.util.Vector tokenlist)
          true, iff tokenlist contains valid setFileName command
protected static boolean isSetFileSize(java.util.Vector tokenlist)
          true, iff tokenlist contains valid setFileSize command
protected static boolean isSetFileSizeReply(java.util.Vector tokenlist)
          true, iff tokenlist contains valid setFileName command
 
Methods inherited from class swpchat.client.ServerConnection
isEmotion, isEmotionReceive, isEmotionReply, isJoinReply, isLeaveReply, isLogoutReply, isMemberInfo, isNegativeRequestUserInfoReply, isNegativeSendUserInfoReply, isNewChannel, isNewChannelReply, isNotification, isPlay, isPlayReply, isPositiveRequestUserInfoReply, isPositiveSendUserInfoReply, isReceive, isReceiveUserInfo, isRemoveChannel, isRemoveChannelReply, isRenameChannel, isRenameChannelReply, isRequestIPAddress, isRequestIPAddressReply, isSendReply, isSendTelephoneRequest, isSendTelephoneRequestReply, isSetNickReply, isSetSessionKeyReply, isSetTopicReply, isShipReceive, isShipReply, isTopicChanged, isWhisperReply, isWhispreceive, readReply, reply, send, send, send, send, writeLine
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

CLS

private static java.lang.String CLS
Constructor Detail

FileConnection

public FileConnection()
Method Detail

isSetFileNameReply

protected static boolean isSetFileNameReply(java.util.Vector tokenlist)
true, iff tokenlist contains valid setFileName command
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid requestUserInfo command

isSetFileSizeReply

protected static boolean isSetFileSizeReply(java.util.Vector tokenlist)
true, iff tokenlist contains valid setFileName command
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid requestUserInfo command

isSendFileRequest

protected static boolean isSendFileRequest(java.util.Vector tokenlist)
true, iff tokenlist contains valid sendFileRequest command.
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid sendFileRequest command

isSendFileRequestReply

protected static boolean isSendFileRequestReply(java.util.Vector tokenlist)
true, iff tokenlist contains valid sendFileRequest command
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid requestUserInfo command

isSetFileSize

protected static boolean isSetFileSize(java.util.Vector tokenlist)
true, iff tokenlist contains valid setFileSize command
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid requestUserInfo command

isSetFileName

protected static boolean isSetFileName(java.util.Vector tokenlist)
true, iff tokenlist contains valid setFileName command
Parameters:
tokenlist - the tokenlist to be analysed
Returns:
true, iff it is a valid requestUserInfo command

isLogin

protected boolean isLogin(java.util.Vector tokenlist)
Returns true, iff the tokenlist contains a valid Login command.
Parameters:
tokenlist - The Vector which is to be analysed
Returns:
result Is it the wanted command or not

isLoginReply

protected static boolean isLoginReply(java.util.Vector tokenlist)
Returns true, iff the tokenlist contains a valid login command.