com.mooapi.common.command.server
Class ConnectionJoined

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

public class ConnectionJoined
extends AbstractServerCommand

MooAPI connection join output command.

Author:
Steve Taylor

Constructor Summary
ConnectionJoined(int connectionId, int channelId, int masterConnectionId, java.lang.String connectionName, java.lang.String connectionIpAddress)
          Initialize.
 
Method Summary
static ConnectionJoined 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 that was joined.
 int getConnectionId()
          Get the connection ID that has joined.
 java.lang.String getConnectionIpAddress()
          Get the IP address of the connection that has joined.
 java.lang.String getConnectionName()
          Get the name of the connection that has joined.
 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

ConnectionJoined

public ConnectionJoined(int connectionId,
                        int channelId,
                        int masterConnectionId,
                        java.lang.String connectionName,
                        java.lang.String connectionIpAddress)
Initialize.

Parameters:
connectionId - The connection ID that has joined.
channelId - The channel ID that was joined.
masterConnectionId - The channel's master connection ID.
connectionName - The connection's name.
connectionIpAddress - The connection's IP address.
Method Detail

decode

public static ConnectionJoined 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 connection ID that has joined.

Returns:
The connection ID.

getChannelId

public int getChannelId()
Get the channel ID that was joined.

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 that has joined.

Returns:
The connection name.

getConnectionIpAddress

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

Returns:
The IP address.

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.

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:


Copyright © 2009. All Rights Reserved.