org.jacorb.orb.giop

Class GIOPConnection

public abstract class GIOPConnection extends OutputStream

GIOPConnection.java Created: Sun Aug 12 21:30:48 2002 Configuration parameters:
jacorb.debug.dump_incoming_messages=[on|off], default=off
jacorb.connection.client.connect_timeout=N, default=0
jacorb.connection.statistics_providers={classnames}, default=(empty)

Version: $Id: GIOPConnection.java,v 1.66 2007/02/06 19:27:28 andre.spiegel Exp $

Author: Nicolas Noffke

Field Summary
protected ConnectionListenerconnection_listener
protected Objectconnect_sync
protected booleandiscard_messages
protected booleando_close
protected Loggerlogger
protected ObjectpendingUndecidedSync
protected Profileprofile
Profile describing the remote endpoint of this connection.
protected StatisticsProviderstatistics_provider
protected StatisticsProviderAdapterstatistics_provider_adapter
protected Connectiontransport
Constructor Summary
GIOPConnection(Profile profile, Connection transport, RequestListener request_listener, ReplyListener reply_listener, StatisticsProvider statistics_provider)
Method Summary
static intallocate_cubby_id()
voidclose()
voidconfigure(Configuration configuration)
voiddecPendingMessages()
voidflush()
protected RequestListenergetRequestListener()
Get the value of request_listener.
StatisticsProvidergetStatisticsProvider()
Get the statistics provider for transport usage statistics that can be used in conjunction with the SelectionStrategy.
StatisticsProvidergetStatisticsProvider(int no)
Return the StatissticsProvider, given the cardinality number
protected StatisticsProviderAdaptergetStatisticsProviderAdapter()
Get an instance of StatisticsProvider derivative, for updating the transport usage statistics.
intgetTCS()
intgetTCSW()
ConnectiongetTransport()
protected voidgetWriteLock()
Objectget_cubby(int id)
booleanhasPendingMessages()
voidincPendingMessages()
booleanisSSL()
booleanisTCSNegotiated()
voidmarkTCSNegotiated()
protected abstract voidreadTimedOut()
Called by this.getMessage() to signal that the attempt to read a message resulted in a timeout.
voidreceiveMessages()
protected voidreleaseWriteLock()
voidsendReply(MessageOutputStream out)
voidsendRequest(MessageOutputStream out, boolean expect_reply)
voidsetCodeSets(int TCS, int TCSW)
voidsetConnectionListener(ConnectionListener connection_listener)
voidsetReplyListener(ReplyListener listener)
Set the value of reply_listener.
voidsetRequestListener(RequestListener listener)
Set the value of request_listener.
voidset_cubby(int id, Object obj)
protected abstract voidstreamClosed()
Called by this.getMessage() to signal that the underlying transport was closed while attempting to read a message.
voidwrite(byte[] fragment, int start, int size)
write (a fragment of) the message (passes it on to the wire)
voidwrite(int value)
voidwrite(byte[] value)

Field Detail

connection_listener

protected ConnectionListener connection_listener

connect_sync

protected Object connect_sync

discard_messages

protected boolean discard_messages

do_close

protected boolean do_close

logger

protected Logger logger

pendingUndecidedSync

protected Object pendingUndecidedSync

profile

protected final Profile profile
Profile describing the remote endpoint of this connection.

statistics_provider

protected StatisticsProvider statistics_provider

statistics_provider_adapter

protected StatisticsProviderAdapter statistics_provider_adapter

transport

protected Connection transport

Constructor Detail

GIOPConnection

public GIOPConnection(Profile profile, Connection transport, RequestListener request_listener, ReplyListener reply_listener, StatisticsProvider statistics_provider)

Method Detail

allocate_cubby_id

public static int allocate_cubby_id()

close

public void close()

configure

public void configure(Configuration configuration)

decPendingMessages

public final void decPendingMessages()

flush

public final void flush()

getRequestListener

protected final RequestListener getRequestListener()
Get the value of request_listener.

Returns: value of request_listener.

getStatisticsProvider

public final StatisticsProvider getStatisticsProvider()
Get the statistics provider for transport usage statistics that can be used in conjunction with the SelectionStrategy. This is a special-case provider, usually supplied by, and known to, the concrete SelectionStrategy. To actually update the usage stats use getStatisticsProviderAdapter()

getStatisticsProvider

public StatisticsProvider getStatisticsProvider(int no)
Return the StatissticsProvider, given the cardinality number

Parameters: no

Returns:

getStatisticsProviderAdapter

protected final StatisticsProviderAdapter getStatisticsProviderAdapter()
Get an instance of StatisticsProvider derivative, for updating the transport usage statistics.

getTCS

public final int getTCS()

getTCSW

public final int getTCSW()

getTransport

public final Connection getTransport()

getWriteLock

protected final void getWriteLock()

get_cubby

public Object get_cubby(int id)

hasPendingMessages

public final boolean hasPendingMessages()

incPendingMessages

public final void incPendingMessages()

isSSL

public final boolean isSSL()

isTCSNegotiated

public final boolean isTCSNegotiated()

markTCSNegotiated

public final void markTCSNegotiated()

readTimedOut

protected abstract void readTimedOut()
Called by this.getMessage() to signal that the attempt to read a message resulted in a timeout. This method is implemented differently on the client and server side.

receiveMessages

public final void receiveMessages()

releaseWriteLock

protected final void releaseWriteLock()

sendReply

public final void sendReply(MessageOutputStream out)

sendRequest

public final void sendRequest(MessageOutputStream out, boolean expect_reply)

setCodeSets

public final void setCodeSets(int TCS, int TCSW)

setConnectionListener

public final void setConnectionListener(ConnectionListener connection_listener)

setReplyListener

public final void setReplyListener(ReplyListener listener)
Set the value of reply_listener.

Parameters: listener Value to assign to reply_listener.

setRequestListener

public final void setRequestListener(RequestListener listener)
Set the value of request_listener.

Parameters: listener Value to assign to request_listener.

set_cubby

public void set_cubby(int id, Object obj)

streamClosed

protected abstract void streamClosed()
Called by this.getMessage() to signal that the underlying transport was closed while attempting to read a message. This method is implemented differently on the client and server side.

write

public final void write(byte[] fragment, int start, int size)
write (a fragment of) the message (passes it on to the wire)

write

public final void write(int value)

write

public final void write(byte[] value)