org.jacorb.orb.giop

Class ClientConnection

Implemented Interfaces:
ConnectionListener, ReplyListener
Known Direct 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.50 2004/05/06 12:40:00 nicolas 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.
GIOPConnection
getGIOPConnection()
int
getId()
String
getInfo()
Profile
getRegisteredProfile()
Get the profile that was used for registering with the ClientConnectionManager.
int
getTCS()
int
getTCSW()
Profile
get_server_profile()
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

Constructor Details

ClientConnection

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

Method Details

cacheSASContext

public long cacheSASContext(byte[] client_authentication_token)


close

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


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


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.


getGIOPConnection

public final GIOPConnection getGIOPConnection()


getId

public int getId()


getInfo

public String getInfo()


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.


getTCS

public int getTCS()


getTCSW

public int getTCSW()


get_server_profile

public Profile get_server_profile()


incClients

public void incClients()


isClientInitiated

public boolean isClientInitiated()


isTCSNegotiated

public boolean isTCSNegotiated()


locateReplyReceived

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


purgeSASContext

public long purgeSASContext(long client_context_id)


replyReceived

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


sendRequest

public void sendRequest(MessageOutputStream os,
                        boolean response_expected)


sendRequest

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


setCodeSet

public ServiceContext setCodeSet(ParsedIOR pior)


streamClosed

public void streamClosed()
the transport has been removed underneath the GIOP layer
Specified by:
streamClosed in interface ConnectionListener