org.jacorb.orb.giop
Class GIOPConnection

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.jacorb.orb.giop.GIOPConnection
Direct Known Subclasses:
ClientGIOPConnection, ServerGIOPConnection

public abstract class GIOPConnection
extends java.io.OutputStream

GIOPConnection.java Created: Sun Aug 12 21:30:48 2002

Version:
$Id: GIOPConnection.java,v 1.41 2004/02/12 11:07:15 gerald Exp $
Author:
Nicolas Noffke

Field Summary
protected  java.lang.Object connect_sync
           
protected  ConnectionListener connection_listener
           
protected  boolean discard_messages
           
protected  boolean do_close
           
protected  java.lang.Object pendingUndecidedSync
           
protected  Profile profile
           
protected  StatisticsProvider statistics_provider
           
protected  Connection transport
           
 
Constructor Summary
GIOPConnection(Profile profile, Connection transport, RequestListener request_listener, ReplyListener reply_listener, StatisticsProvider statistics_provider)
           
 
Method Summary
static int allocate_cubby_id()
           
 void close()
           
 void decPendingMessages()
           
 void flush()
           
 java.lang.Object get_cubby(int id)
           
protected  RequestListener getRequestListener()
          Get the value of request_listener.
 StatisticsProvider getStatisticsProvider()
          Get the statistics provider for transport usage statistics.
 int getTCS()
           
 int getTCSW()
           
 Connection getTransport()
           
protected  void getWriteLock()
           
 boolean hasPendingMessages()
           
 void incPendingMessages()
           
 boolean isSSL()
           
 boolean isTCSNegotiated()
           
 void markTCSNegotiated()
           
protected abstract  void readTimedOut()
           
 void receiveMessages()
           
protected  void releaseWriteLock()
           
 void sendReply(MessageOutputStream out)
           
 void sendRequest(MessageOutputStream out, boolean expect_reply)
           
 void set_cubby(int id, java.lang.Object obj)
           
 void setCodeSets(int TCS, int TCSW)
           
 void setConnectionListener(ConnectionListener connection_listener)
           
 void setReplyListener(ReplyListener v)
          Set the value of reply_listener.
 void setRequestListener(RequestListener v)
          Set the value of request_listener.
protected abstract  void streamClosed()
           
 void write(byte[] b)
           
 void write(byte[] fragment, int start, int size)
          write (a fragment of) the message (passes it on to the wire)
 void write(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profile

protected Profile profile

transport

protected Connection transport

connection_listener

protected ConnectionListener connection_listener

connect_sync

protected java.lang.Object connect_sync

discard_messages

protected boolean discard_messages

pendingUndecidedSync

protected java.lang.Object pendingUndecidedSync

do_close

protected boolean do_close

statistics_provider

protected StatisticsProvider statistics_provider
Constructor Detail

GIOPConnection

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

setCodeSets

public final void setCodeSets(int TCS,
                              int TCSW)

getTCS

public final int getTCS()

getTCSW

public final int getTCSW()

markTCSNegotiated

public final void markTCSNegotiated()

isTCSNegotiated

public final boolean isTCSNegotiated()

getRequestListener

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

Returns:
value of request_listener.

setRequestListener

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

Parameters:
v - Value to assign to request_listener.

setReplyListener

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

Parameters:
v - Value to assign to reply_listener.

setConnectionListener

public final void setConnectionListener(ConnectionListener connection_listener)

getTransport

public final Connection getTransport()

readTimedOut

protected abstract void readTimedOut()

streamClosed

protected abstract void streamClosed()

receiveMessages

public final void receiveMessages()
                           throws java.io.IOException
Throws:
java.io.IOException

getWriteLock

protected final void getWriteLock()

releaseWriteLock

protected final void releaseWriteLock()

incPendingMessages

public final void incPendingMessages()

decPendingMessages

public final void decPendingMessages()

hasPendingMessages

public final boolean hasPendingMessages()

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 i)
                 throws java.io.IOException
Throws:
java.io.IOException

write

public final void write(byte[] b)
                 throws java.io.IOException
Throws:
java.io.IOException

flush

public final void flush()
                 throws java.io.IOException
Throws:
java.io.IOException

sendRequest

public final void sendRequest(MessageOutputStream out,
                              boolean expect_reply)
                       throws java.io.IOException
Throws:
java.io.IOException

sendReply

public final void sendReply(MessageOutputStream out)
                     throws java.io.IOException
Throws:
java.io.IOException

isSSL

public final boolean isSSL()

close

public void close()

getStatisticsProvider

public final StatisticsProvider getStatisticsProvider()
Get the statistics provider for transport usage statistics.


allocate_cubby_id

public static int allocate_cubby_id()

get_cubby

public java.lang.Object get_cubby(int id)

set_cubby

public void set_cubby(int id,
                      java.lang.Object obj)