org.jacorb.orb.giop
Class ClientConnection

java.lang.Object
  extended byorg.jacorb.orb.giop.ClientConnection
All Implemented Interfaces:
ConnectionListener, ReplyListener

public class ClientConnection
extends java.lang.Object
implements ReplyListener, ConnectionListener

ClientConnection.java Created: Sat Aug 18 18:37:56 2002

Version:
$Id: ClientConnection.java,v 1.58 2005/10/31 11:33:35 andre.spiegel Exp $
Author:
Nicolas Noffke

Constructor Summary
ClientConnection(GIOPConnection connection, ORB orb, ClientConnectionManager conn_mg, Profile registeredProfile, boolean client_initiated)
           
 
Method Summary
 long cacheSASContext(byte[] client_authentication_token)
           
 void close()
          called from Delegate/ConnectionManagement etc.
 void closeConnectionReceived(byte[] close_conn, GIOPConnection connection)
          Received a CloseConnection message.
 void connectionClosed()
          Operations from ConnectionListener used for upcalls from GIOPConnection
 boolean decClients()
          Decrements the number of clients and returns true if the number reaches zero.
 Profile get_server_profile()
           
 GIOPConnection getGIOPConnection()
           
 int getId()
           
 java.lang.String getInfo()
           
 Profile getRegisteredProfile()
          Get the profile that was used for registering with the ClientConnectionManager.
 int getTCS()
           
 int getTCSW()
           
 void incClients()
          Increments the number of clients.
 boolean isClientInitiated()
           
 boolean isTCSNegotiated()
           
 void locateReplyReceived(byte[] reply, GIOPConnection connection)
           
 int numClients()
          Returns the number of clients currently using this connection.
 long purgeSASContext(long client_context_id)
           
 void replyReceived(byte[] reply, GIOPConnection connection)
          Operations from ReplyListener
 void sendRequest(MessageOutputStream os, boolean response_expected)
           
 void sendRequest(MessageOutputStream os, ReplyPlaceholder placeholder, int request_id, boolean response_expected)
          The request_id parameter is only used, if response_expected.
 void setCodeSet(ParsedIOR pior)
           
 void streamClosed()
          the transport has been removed underneath the GIOP layer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConnection

public ClientConnection(GIOPConnection connection,
                        ORB orb,
                        ClientConnectionManager conn_mg,
                        Profile registeredProfile,
                        boolean client_initiated)
Method Detail

getGIOPConnection

public final GIOPConnection getGIOPConnection()

getRegisteredProfile

public Profile getRegisteredProfile()
Get the profile that was used for registering with the ClientConnectionManager. In case of BiDirIIOP it is NOT equal to the transports profile.


setCodeSet

public void setCodeSet(ParsedIOR pior)

isTCSNegotiated

public boolean isTCSNegotiated()

getTCS

public int getTCS()

getTCSW

public int getTCSW()

getInfo

public java.lang.String getInfo()

getId

public int getId()

incClients

public void incClients()
Increments the number of clients.


decClients

public boolean decClients()
Decrements the number of clients and returns true if the number reaches zero.


numClients

public int numClients()
Returns the number of clients currently using this connection.


isClientInitiated

public boolean isClientInitiated()

sendRequest

public void sendRequest(MessageOutputStream os,
                        ReplyPlaceholder placeholder,
                        int request_id,
                        boolean response_expected)
The request_id parameter is only used, if response_expected.


sendRequest

public void sendRequest(MessageOutputStream os,
                        boolean response_expected)

close

public void close()
called from Delegate/ConnectionManagement etc.


replyReceived

public void replyReceived(byte[] reply,
                          GIOPConnection connection)
Operations from ReplyListener

Specified by:
replyReceived in interface ReplyListener

locateReplyReceived

public void locateReplyReceived(byte[] reply,
                                GIOPConnection connection)
Specified by:
locateReplyReceived in interface ReplyListener

closeConnectionReceived

public void closeConnectionReceived(byte[] close_conn,
                                    GIOPConnection connection)
Received a CloseConnection message. Remarshal all pending messages. The close mechanism will be invoked separately by the actual closing of the Transport and will trigger the remarshaling.

Specified by:
closeConnectionReceived in interface ReplyListener

connectionClosed

public void connectionClosed()
Operations from ConnectionListener used for upcalls from GIOPConnection

Specified by:
connectionClosed in interface ConnectionListener

streamClosed

public void streamClosed()
the transport has been removed underneath the GIOP layer

Specified by:
streamClosed in interface ConnectionListener

get_server_profile

public Profile get_server_profile()

cacheSASContext

public long cacheSASContext(byte[] client_authentication_token)

purgeSASContext

public long purgeSASContext(long client_context_id)