com.mooapi.common.command.client
Class ChannelJoin

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

public class ChannelJoin
extends AbstractClientCommand

MooAPI channel join request input command.

Author:
Steve Taylor

Constructor Summary
ChannelJoin(java.lang.String channelName)
          Create a channel join request command.
 
Method Summary
static ChannelJoin decode(org.apache.mina.common.ByteBuffer buffer)
          Create a ChannelJoinRequestInputCommand from 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 getChannelName()
          Get this command's channel 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

ChannelJoin

public ChannelJoin(java.lang.String channelName)
Create a channel join request command.

Parameters:
channelName - The channel name that a conection wished to join.
Method Detail

decode

public static ChannelJoin decode(org.apache.mina.common.ByteBuffer buffer)
Create a ChannelJoinRequestInputCommand from the specified input buffer.

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

getChannelName

public java.lang.String getChannelName()
Get this command's channel name.

Returns:
The channel 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.