com.mooapi.common.command.client
Class NameChange

java.lang.Object
  extended by com.mooapi.common.command.client.AbstractClientCommand
      extended by com.mooapi.common.command.client.NameChange
All Implemented Interfaces:
Command

public class NameChange
extends AbstractClientCommand

MooAPI name change input command.

Author:
Steve Taylor

Constructor Summary
NameChange(java.lang.String name)
          Create a new name change input command.
 
Method Summary
static NameChange decode(org.apache.mina.common.ByteBuffer buffer)
          Create a new name change input command from the data in the specified input buffer.
 org.apache.mina.common.ByteBuffer encode()
          Encode this command to a byte buffer.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Get the connection's new name.
 int hashCode()
           
 java.lang.String toString()
          Generate a string representation of this command.
 
Methods inherited from class com.mooapi.common.command.client.AbstractClientCommand
getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameChange

public NameChange(java.lang.String name)
Create a new name change input command.

Parameters:
name - The connection's new name.
Method Detail

decode

public static NameChange decode(org.apache.mina.common.ByteBuffer buffer)
Create a new name change input command from the data in the specified input buffer.

Parameters:
buffer - An input buffer.
Returns:
A new name change input command.
Throws:
java.nio.BufferUnderflowException - If the input buffer has insufficient bytes.

encode

public org.apache.mina.common.ByteBuffer encode()
Encode this command to a byte buffer.

Specified by:
encode in class AbstractClientCommand
Returns:
A buffer containing the encoded command.

getName

public java.lang.String getName()
Get the connection's new name.

Returns:
The connection's new name.

toString

public java.lang.String toString()
Generate a string representation of this command.

Specified by:
toString in class AbstractClientCommand
Returns:
This command's string representation.

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in class AbstractClientCommand
Parameters:
obj -
Returns:

hashCode

public int hashCode()
Specified by:
hashCode in class AbstractClientCommand
Returns:


Copyright © 2009. All Rights Reserved.