org.jacorb.orb.iiop

Class IIOPConnection

Implemented Interfaces:
Configurable, Connection, ConnectionOperations, IDLEntity, LocalInterface, Object, java.io.Serializable
Known Direct Subclasses:
ClientIIOPConnection, ServerIIOPConnection

public abstract class IIOPConnection
extends _ConnectionLocalBase
implements Configurable

IIOPConnection.java Created: Sun Aug 12 20:18:47 2002

Version:
$Id: IIOPConnection.java,v 1.7 2004/05/06 12:40:00 nicolas Exp $

Author:
Nicolas Noffke / Andre Spiegel

Field Summary

protected org.jacorb.config.Configuration
configuration
protected boolean
connected
protected String
connection_info
protected InputStream
in_stream
protected Logger
logger
shared with sub classes
protected OutputStream
out_stream
protected Socket
socket

Constructor Summary

IIOPConnection()
IIOPConnection(IIOPConnection other)

Method Summary

void
configure(Configuration configuration)
void
flush()
boolean
isSSL()
boolean
is_connected()
boolean
is_data_available()
Simply return true if calling a read on this instance would find data in the connection.
void
read(BufferHolder data, int offset, int min_length, int max_length, long time_out)
read actual messages
boolean
supports_callback()
A boolean flag describing whether this connection supports the Bidirectional GIOP mechanism as described by GIOP-1.2 in CORBA 2.3.1 (OMG Document: formal/99-10-07).
protected COMM_FAILURE
to_COMM_FAILURE(IOException ex)
void
turnOnFinalTimeout()
This is used to tell the transport that a CloseConnection has been sent, and that it should set a timeout in case the client doesn't close its side of the connection right away.
boolean
use_handle_time_out()
A flag directing the ORB to use either the Handle class to perform data queries with a time_out, or the transport layer (through this connection).
boolean
wait_next_data(long time_out)
Wait for the given time_out period for incoming data on this connection.
void
write(boolean is_first, boolean is_last, byte[] data, int offset, int length, long time_out)

Methods inherited from class org.omg.ETF._ConnectionLocalBase

_ids

Methods inherited from class org.omg.CORBA.LocalObject

_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection

Field Details

configuration

protected org.jacorb.config.Configuration configuration


connected

protected boolean connected


connection_info

protected String connection_info


in_stream

protected InputStream in_stream


logger

protected Logger logger
shared with sub classes


out_stream

protected OutputStream out_stream


socket

protected Socket socket

Constructor Details

IIOPConnection

public IIOPConnection()


IIOPConnection

public IIOPConnection(IIOPConnection other)

Method Details

configure

public void configure(Configuration configuration)
            throws ConfigurationException


flush

public void flush()
Specified by:
flush in interface ConnectionOperations


isSSL

public boolean isSSL()


is_connected

public boolean is_connected()
Specified by:
is_connected in interface ConnectionOperations


is_data_available

public boolean is_data_available()
Simply return true if calling a read on this instance would find data in the connection. Otherwise, the function shall return false.
Specified by:
is_data_available in interface ConnectionOperations


read

public void read(BufferHolder data,
                 int offset,
                 int min_length,
                 int max_length,
                 long time_out)
read actual messages
Specified by:
read in interface ConnectionOperations


supports_callback

public boolean supports_callback()
A boolean flag describing whether this connection supports the Bidirectional GIOP mechanism as described by GIOP-1.2 in CORBA 2.3.1 (OMG Document: formal/99-10-07). It shall return true if it does, and false if it does not.
Specified by:
supports_callback in interface ConnectionOperations


to_COMM_FAILURE

protected COMM_FAILURE to_COMM_FAILURE(IOException ex)


turnOnFinalTimeout

public void turnOnFinalTimeout()
This is used to tell the transport that a CloseConnection has been sent, and that it should set a timeout in case the client doesn't close its side of the connection right away. This should only be called on the thread that listens on the socket because timeouts are not applied until read() is called the next time.


use_handle_time_out

public boolean use_handle_time_out()
A flag directing the ORB to use either the Handle class to perform data queries with a time_out, or the transport layer (through this connection). The instance shall return true, if the Handle should signal time outs for read operations. Then the ORB may not call wait_next_data. Otherwise, a false shall be returned, and the function wait_next_data shall be implemented by this class.
Specified by:
use_handle_time_out in interface ConnectionOperations


wait_next_data

public boolean wait_next_data(long time_out)
Wait for the given time_out period for incoming data on this connection. It shall return false if this call times out and no data is available. It may not throw a TIMEOUT exception. If data can already be read or arrives before the end of the time out, this function shall return true, immediately.
Specified by:
wait_next_data in interface ConnectionOperations


write

public void write(boolean is_first,
                  boolean is_last,
                  byte[] data,
                  int offset,
                  int length,
                  long time_out)
Specified by:
write in interface ConnectionOperations