org.openorb.orb.net
Interface ClientChannel

All Superinterfaces:
Channel
All Known Implementing Classes:
IIOPClientChannel

public interface ClientChannel
extends Channel

Client channel interface. A client channel creates and sends requests and recieves replies.

Version:
$Revision: 1.5 $ $Date: 2004/07/22 12:25:45 $
Author:
Chris Wood

Field Summary
static int STATE_CLOSED
          Channel closed.
static int STATE_CONNECTED
          Connection open.
static int STATE_PAUSED
          Channel paused.
 
Method Summary
 void close(boolean kill_requests, org.omg.CORBA.SystemException ex)
          Change to the CLOSED state and reject new requests by throwing a system exception with status COMPLETED_NO.
 ClientRequest create_locate_request(org.omg.CORBA.Object target, Address address)
          Create a locate request.
 ClientRequest create_request(org.omg.CORBA.Object target, Address address, java.lang.String operation, boolean response_expected)
          Create a request.
 org.omg.CORBA.ORB orb()
          An orb reference.
 void pause()
          Pause the channel.
 int state()
          Connection state.
 
Methods inherited from interface org.openorb.orb.net.Channel
active_requests, channel_age, recv, run_recv, transport
 

Field Detail

STATE_CONNECTED

static final int STATE_CONNECTED
Connection open. In this state requests can be created without checking the rebind policy.

See Also:
Constant Field Values

STATE_PAUSED

static final int STATE_PAUSED
Channel paused. The channel has been shut down temporaraly to conserve resources or has recently been created. Creating new requests with with rebind policy set to NO_RECONNECT will result in a REBIND exception. Channels are created in this state.

See Also:
Constant Field Values

STATE_CLOSED

static final int STATE_CLOSED
Channel closed. This state is typicaly reached if transmission difficulties are experienced. Attempting to create requests on closed channels will cause a system exception. The channel can be reopened only using the open operation.

See Also:
Constant Field Values
Method Detail

orb

org.omg.CORBA.ORB orb()
An orb reference.


state

int state()
Connection state. Note that state values are 0x1000000 apart, Allowing this value to be ORed with the binding priority on the client side.


pause

void pause()
Pause the channel. If no requests are currently active enter the paused state.


close

void close(boolean kill_requests,
           org.omg.CORBA.SystemException ex)
Change to the CLOSED state and reject new requests by throwing a system exception with status COMPLETED_NO. If kill_requests is true, call cancel on any active ClientRequests, otherwise wait until active requests complete before closing the commmunication channel.


create_request

ClientRequest create_request(org.omg.CORBA.Object target,
                             Address address,
                             java.lang.String operation,
                             boolean response_expected)
                             throws RebindChannelException
Create a request. If this is the first request on this channel then client_connect will be called on all ChannelInterceptor before returning the request. This may throw a system exception if the channel cannot establish a connection for some reason, for example INV_POLICY if client side policies prevent a successfull invocation, COMM_FAILURE if a communication problem occours, or REBIND if channel is temporaraly closed and a NO_REBIND policy is in effect.

Parameters:
target - The target of the request.
address - The target address. If the target has been redirected this may not correspond to the target's ior.
Throws:
RebindChannelException

create_locate_request

ClientRequest create_locate_request(org.omg.CORBA.Object target,
                                    Address address)
                                    throws RebindChannelException
Create a locate request. This may throw a system exception if the channel cannot establish a connection for some reason, for example INV_POLICY if client side policies prevent a successfull invocation, COMM_FAILURE if a communication problem occours, or REBIND if channel is temporaraly closed and a NO_REBIND policy is in effect.

Parameters:
target - The target of the request.
address - The target address. If the target has been redirected this may not correspond to the target's ior.
Throws:
RebindChannelException