org.openorb.iiop
Class IIOPServerChannel

java.lang.Object
  |
  +--org.openorb.iiop.IIOPServerChannel
All Implemented Interfaces:
Channel, ServerChannel

public class IIOPServerChannel
extends java.lang.Object
implements ServerChannel

IIOP implementation of ServerChannel

Version:
$Revision: 1.12 $ $Date: 2001/08/13 03:47:33 $
Author:
Chris Wood <wood@intalio.com>

Fields inherited from interface org.openorb.net.ServerChannel
STATE_CLOSED, STATE_CONNECTED
 
Method Summary
 int active_requests()
          Active request count.
 int channel_age()
          Indication of channel age.
 void close()
          Close the connection.
 int getTCSC()
           
 int getTCSW()
           
 ORB orb()
          An orb reference.
 boolean recv(int timeout)
          Wait the specified amount of time for an incoming message.
 void run_recv()
          Donate a thread for recieving messages.
 void soft_close(boolean ifActive)
          Close the connection after all currently processing requests are complete.
 int state()
          Return the state of the channel.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTCSC

public int getTCSC()

getTCSW

public int getTCSW()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

orb

public ORB orb()
Description copied from interface: ServerChannel
An orb reference.
Specified by:
orb in interface ServerChannel

state

public int state()
Description copied from interface: ServerChannel
Return the state of the channel.
Specified by:
state in interface ServerChannel

active_requests

public int active_requests()
Active request count. This is the number of requests which have not yet been sent or are still expecting a reply. This will return -1 if the channel has been perminently closed.
Specified by:
active_requests in interface Channel

channel_age

public int channel_age()
Indication of channel age. On the client side this is the request ID of the oldest active request, Since request IDs rise sequentialy this gives an indication of the activity on the channel. On server channels this will result in a call to peek_request_id if active_requests would be non-zero, otherwise it returns whatever peek_request_id returned the last time active_requests dropped to zero.
Specified by:
channel_age in interface Channel

close

public void close()
Close the connection. This closes the channel immediatly, all replys to current requests will be discarded. This is a disorderly shutdown.
Specified by:
close in interface ServerChannel

soft_close

public void soft_close(boolean ifActive)
Close the connection after all currently processing requests are complete. If there are no currently active requests the channel will close immediatly otherwise if ifActive is true then the channel will close once all currently active requests have completed, and in the mean time new incomming requests will be silently discarded. This call returns immediatly, use the state function to interrogate the state while a close is pending.
Specified by:
soft_close in interface ServerChannel

recv

public boolean recv(int timeout)
Wait the specified amount of time for an incoming message.
Specified by:
recv in interface Channel

run_recv

public void run_recv()
Donate a thread for recieving messages. This function returns when interrupt is called on the thread or the channel is closed.
Specified by:
run_recv in interface Channel