org.jacorb.orb.giop
Class ClientConnection

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

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.48 2004/02/05 15:57:12 nick.cross 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()
          This method decrements the number of clients.
 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()
           
 boolean isClientInitiated()
           
 boolean isTCSNegotiated()
           
 void locateReplyReceived(byte[] reply, GIOPConnection 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.
 ServiceContext 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 ServiceContext 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()

decClients

public boolean decClients()
This method decrements the number of clients. If the number reaches zero it also calls close.

Returns:
a boolean value, true if client_count is zero.

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)