com.mooapi.common.command.server
Class ChannelDetails

java.lang.Object
  extended by com.mooapi.common.command.server.AbstractServerCommand
      extended by com.mooapi.common.command.server.ChannelDetails
All Implemented Interfaces:
Command

public class ChannelDetails
extends AbstractServerCommand

MooAPI channel join details output command.

Author:
Steve Taylor

Constructor Summary
ChannelDetails(int connectionId, int channelId, int masterConnectionId, java.lang.String connectionName, java.lang.String connectionIpAddress, java.lang.String channelName)
           
 
Method Summary
static ChannelDetails decode(org.apache.mina.common.ByteBuffer buffer)
           
 org.apache.mina.common.ByteBuffer encode()
          Encode this command as a byte stream.
 boolean equals(java.lang.Object obj)
           
 int getChannelId()
          Get the channel ID the client just connected to.
 java.lang.String getChannelName()
          Get the channel name.
 int getConnectionId()
          Get the ID of the connection receiving this command.
 java.lang.String getConnectionIpAddress()
          Get the IP address of the connection.
 java.lang.String getConnectionName()
          Get the name of the connection.
 int getMasterConnectionId()
          Get the channel's master connection ID.
 int hashCode()
           
 java.lang.String toString()
          Generate a string representation of this message.
 
Methods inherited from class com.mooapi.common.command.server.AbstractServerCommand
getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChannelDetails

public ChannelDetails(int connectionId,
                      int channelId,
                      int masterConnectionId,
                      java.lang.String connectionName,
                      java.lang.String connectionIpAddress,
                      java.lang.String channelName)
Parameters:
connectionId - Connection ID of the client receiving this command.
channelId - Channel ID that the client just connected to.
masterConnectionId - Master connection ID of the channel.
connectionName - Receiver's connection name.
connectionIpAddress - Receiver's IP address.
channelName - Channel name.
Method Detail

decode

public static ChannelDetails decode(org.apache.mina.common.ByteBuffer buffer)
Parameters:
buffer -
Returns:

encode

public org.apache.mina.common.ByteBuffer encode()
Encode this command as a byte stream.

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

getConnectionId

public int getConnectionId()
Get the ID of the connection receiving this command.

Returns:
The connection ID.

getChannelId

public int getChannelId()
Get the channel ID the client just connected to.

Returns:
The channel ID.

getMasterConnectionId

public int getMasterConnectionId()
Get the channel's master connection ID.

Returns:
The master connection ID.

getConnectionName

public java.lang.String getConnectionName()
Get the name of the connection.

Returns:
The connection name.

getConnectionIpAddress

public java.lang.String getConnectionIpAddress()
Get the IP address of the connection.

Returns:
The IP address.

getChannelName

public java.lang.String getChannelName()
Get the channel name.

Returns:
The channel name.

equals

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

hashCode

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

toString

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

Specified by:
toString in class AbstractServerCommand
Returns:
A string representation of this message.


Copyright © 2009. All Rights Reserved.