com.mooapi.common.command.client
Class ChannelLeave

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

public class ChannelLeave
extends AbstractClientCommand

MooAPI leave channel input command.

Author:
Steve Taylor

Constructor Summary
ChannelLeave(int channelId)
          Create a new leave channel input command.
 
Method Summary
static ChannelLeave decode(org.apache.mina.common.ByteBuffer buffer)
          Create a new leave channel 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)
           
 int getChannelId()
          Get the channel ID to leave.
 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

ChannelLeave

public ChannelLeave(int channelId)
Create a new leave channel input command.

Parameters:
channelId - The ID of the channel to leave.
Method Detail

decode

public static ChannelLeave decode(org.apache.mina.common.ByteBuffer buffer)
Create a new leave channel input command from the data in the specified input buffer.

Parameters:
buffer - An input buffer.
Returns:
A new leave channel 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.

getChannelId

public int getChannelId()
Get the channel ID to leave.

Returns:
The channel ID to leave.

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.