org.apache.yoko.orb.OCI
Interface AcceptorOperations

All Known Subinterfaces:
Acceptor

public interface AcceptorOperations

An interface for an Acceptor object, which is used by CORBA servers to accept client connection requests. It also provides operations for the management of IOR profiles.

See Also:
AccRegistry, AccFactory, Transport

Method Summary
 Transport accept(boolean block)
          Used by CORBA servers to accept client connection requests.
 void add_profiles(ProfileInfo profile_info, POAPolicies policies, IORHolder ref)
          Add new profiles that match this Acceptor to an IOR.
 void close()
          Closes the Acceptor.
 Transport connect_self()
          Connect to this acceptor.
 AcceptorInfo get_info()
          Returns the information object associated with the Acceptor.
 ProfileInfo[] get_local_profiles(IOR ref)
          From the given IOR, get basic information about all profiles for which are local to this Acceptor.
 int handle()
          The "handle" for this Acceptor.
 String id()
          The plugin id.
 void listen()
          Sets the acceptor up to listen for incoming connections.
 void shutdown()
          Shutdown the Acceptor.
 int tag()
          The profile id tag.
 

Method Detail

id

String id()
The plugin id.


tag

int tag()
The profile id tag.


handle

int handle()
The "handle" for this Acceptor. Like with the handle for Transports, the handle may only be used with operations like select(). A handle value of -1 indicates that the protocol plug-in does not support "selectable" Transports.


close

void close()
Closes the Acceptor. accept or listen may not be called after close has been called.

Throws:
COMM_FAILURE - In case of an error.

shutdown

void shutdown()
Shutdown the Acceptor. After shutdown, the socket will not listen to further connection requests.

Throws:
COMM_FAILURE - In case of an error.

listen

void listen()
Sets the acceptor up to listen for incoming connections. Until this method is called on the acceptor, new connection requests should result in a connection request failure.

Throws:
COMM_FAILURE - In case of an error.

accept

Transport accept(boolean block)
Used by CORBA servers to accept client connection requests. It returns a Transport object, which can be used for sending and receiving octet streams to and from the client.

Parameters:
block - If set to TRUE, the operation blocks until a new connection has been accepted. If set to FALSE, the operation returns a nil object reference if there is no new connection ready to be accepted.
Returns:
The new Transport object.
Throws:
COMM_FAILURE - In case of an error.

connect_self

Transport connect_self()
Connect to this acceptor. This operation can be used to unblock threads that are blocking in accept.

Returns:
The new Transport object.
Throws:
TRANSIENT - If the server cannot be contacted.
COMM_FAILURE - In case of other errors.

add_profiles

void add_profiles(ProfileInfo profile_info,
                  POAPolicies policies,
                  IORHolder ref)
Add new profiles that match this Acceptor to an IOR.

Parameters:
profile_info - The basic profile information to use for the new profiles.
ref - The IOR.

get_local_profiles

ProfileInfo[] get_local_profiles(IOR ref)
From the given IOR, get basic information about all profiles for which are local to this Acceptor.

Parameters:
ref - The IOR from which the profiles are taken.
Returns:
The sequence of basic information about profiles. If this sequence is empty, there is no profile in the IOR that is local to the Acceptor.

get_info

AcceptorInfo get_info()
Returns the information object associated with the Acceptor.

Returns:
The Acceptor information object.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.