java.lang.Object | +--JChat.Message
JChat Classe Mensagem / Message class esta classe é responsável pela manipulaçao das mensagens em todos os pontos do pacote JChat this class is responsible for the Message handling on every instance of the package
| Fields inherited from interface JChat.MessageConstants |
ADD_USER, CH_SYS_MSG, CH_USER, CHAN_INFO, CHAN_UPDATE, CHOOSE_NICK, CLI_UNKNOWN, EXIT_CHAN, HELLO, INFO_CHAN, JOIN, JOIN_DENY, JOIN_OK, LIST_ROOMS, MAXCHANNELS, MAXCONEXIONS, MSG, MSG_TO_CHANNEL, NICK, NICK_DENY, NICK_OK, REM_USER, ROOM_LIST, SYS_MSG |
| Constructor Summary | |
Message()
cria um novo pacote / creates a new Message packet |
|
Message(int header,
java.lang.String origem,
java.lang.String destino,
java.lang.String mensagem)
cria um novo pacote / creates a new Message packet |
|
| Method Summary | |
java.lang.String |
getDest()
retorna o destino da mensagem / gets the destination of the message |
int |
getHeader()
retorna o código da mensagem / gets the message header |
java.lang.String |
getMessage()
retorna o corpo da mensagem / gets the message contents |
java.lang.String |
getOrigin()
retorna a origem da mensagem / gets the origin of the message |
void |
setDest(java.lang.String dest)
seta o destino / sets the destination |
void |
setHeader(int code)
seta o tipo de mensagem / sets the kind of the message |
void |
setMessage(java.lang.String mes)
seta o corpo da mensagem / sets the message's body |
void |
setOrigin(java.lang.String orig)
seta a origem da mensagem / sets the message's origin |
java.lang.String |
toString()
converte uma mensagem em string / converts a message to string |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Message()
public Message(int header,
java.lang.String origem,
java.lang.String destino,
java.lang.String mensagem)
header - o codigo da mensagem (seguindo convenção da interface MessageConstants) / the code's header (following the conveniences of MessageConstants)origem - a origem da mensagem / the message's origindestino - o destino da mensagem / the message's destinationmensagem - a mensagem / the main message| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getMessage()
public int getHeader()
public java.lang.String getOrigin()
public java.lang.String getDest()
public void setDest(java.lang.String dest)
dest - a identificacao do destino / the destination's idpublic void setOrigin(java.lang.String orig)
orig - a identificaçao da origem / the origin's identificationpublic void setMessage(java.lang.String mes)
mes - o string da mensagem / the message stringpublic void setHeader(int code)
o - codigo do cabeçalho (seguindo especificações de MessageConstants) / code the header code (following the MessageConstants convention)