org.alliance.core.comm
Class AuthenticatedConnection

java.lang.Object
  extended by org.alliance.core.comm.Connection
      extended by org.alliance.core.comm.PacketConnection
          extended by org.alliance.core.comm.AuthenticatedConnection
Direct Known Subclasses:
FriendConnection, InvitationConnection, TransferConnection

public abstract class AuthenticatedConnection
extends PacketConnection

Created by IntelliJ IDEA. User: maciek Date: 2005-dec-28 Time: 14:55:58


Nested Class Summary
 
Nested classes/interfaces inherited from class org.alliance.core.comm.Connection
Connection.Direction
 
Field Summary
protected  int remoteUserGUID
           
 
Fields inherited from class org.alliance.core.comm.Connection
bandwidthIn, bandwidthOut, bytesReceived, bytesSent, connected, core, direction, hasWriteInterest, key, netMan, statusString
 
Constructor Summary
protected AuthenticatedConnection(NetworkManager netMan, Connection.Direction direction)
           
protected AuthenticatedConnection(NetworkManager netMan, Connection.Direction direction, int userGUID)
           
protected AuthenticatedConnection(NetworkManager netMan, Connection.Direction direction, java.lang.Object key)
           
protected AuthenticatedConnection(NetworkManager netMan, java.lang.Object key, Connection.Direction direction, int userGUID)
           
 
Method Summary
 Friend getRemoteFriend()
           
 int getRemoteUserGUID()
           
 java.net.SocketAddress getSocketAddress()
           
 void init()
           
static AuthenticatedConnection newInstance(NetworkManager netMan, java.lang.Object key, int connectiondId, int guid)
           
 void sendConnectionIdentifier()
           
 void setRemoteUserGUID(int guid)
           
 java.lang.String toString()
           
 
Methods inherited from class org.alliance.core.comm.PacketConnection
getLastPacketSentAt, getPacketsReceived, packetReceived, readyToSend, received, send
 
Methods inherited from class org.alliance.core.comm.Connection
bytesReceived, bytesSent, close, getBandwidthIn, getBandwidthOut, getBytesReceived, getBytesSent, getConnectionId, getConnectionIdForRemote, getDirection, getKey, getNetMan, getStatusString, hasWriteInterest, isConnected, setHasWriteInterest, setKey, setStatusString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

remoteUserGUID

protected int remoteUserGUID
Constructor Detail

AuthenticatedConnection

protected AuthenticatedConnection(NetworkManager netMan,
                                  Connection.Direction direction)

AuthenticatedConnection

protected AuthenticatedConnection(NetworkManager netMan,
                                  Connection.Direction direction,
                                  java.lang.Object key)

AuthenticatedConnection

protected AuthenticatedConnection(NetworkManager netMan,
                                  java.lang.Object key,
                                  Connection.Direction direction,
                                  int userGUID)

AuthenticatedConnection

protected AuthenticatedConnection(NetworkManager netMan,
                                  Connection.Direction direction,
                                  int userGUID)
Method Detail

init

public void init()
          throws java.io.IOException
Overrides:
init in class PacketConnection
Throws:
java.io.IOException

getRemoteUserGUID

public int getRemoteUserGUID()

setRemoteUserGUID

public void setRemoteUserGUID(int guid)

sendConnectionIdentifier

public void sendConnectionIdentifier()
                              throws java.io.IOException
Throws:
java.io.IOException

newInstance

public static AuthenticatedConnection newInstance(NetworkManager netMan,
                                                  java.lang.Object key,
                                                  int connectiondId,
                                                  int guid)
                                           throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class Connection

getSocketAddress

public java.net.SocketAddress getSocketAddress()

getRemoteFriend

public Friend getRemoteFriend()