ORB
implements the OMG CORBA ORB
pseudo interface and adds a number of methods specific to OrbixWeb.
ORB
provides a set of methods that control OrbixWeb from the client. These include operations to convert between strings and object references, and operations for use with the Dynamic Invocation Interface (DII).The methods on this class are invoked through the
_CORBA.Orbix
object.
// Pseudo IDL // In module CORBA pseudo interface ORB ( typedef sequence<Request> RequestSeq; typedef sequence<string> arg_list; typedef string OAid; BOA BOA_init(inout arg_list argv, in OAid boa_identifier); string object_to_string(in Object obj); Object string_to_object(in string str); Status create_list(in long count, out NVList new_list); Status create_operation_list( in OperationDef oper, out NVList new_list); Status get_default_context(out Context ctx); Status create_environment( out Environment new_env); Status send_multiple_requests_oneway( in RequestSeq req); Status send_multiple_requests_deferred( in RequestSeq req); boolean poll_next_response(); Status get_next_response(out Request req); };
// Java package IE.Iona.Orbix2.CORBA; public class ORB { // Methods public IE.Iona.Orbix2.CORBA._ObjectRef string_to_object(String s) throws SystemException; public IE.Iona.Orbix2.CORBA._ObjectRef string_to_object( String host, String IR_host, String ServerName, String marker, String IR_server, String interfaceMarker) throws SystemException; public String object_to_string( IE.Iona.Orbix2.CORBA._ObjectRef oref) throws SystemException; public boolean isBaseInterfaceOf(String derived, String maybeABase) throws SystemException; public _sequence_String baseInterfacesOf(String derived) throws SystemException; public int setDiagnostics(int level); public boolean pingDuringBind(boolean pingOn); public int defaultTxTimeout(int val); public int maxConnectRetries(int retries); public boolean noReconnectOnFailure(boolean b); public Context get_default_context(); public String get_principal(); public void set_principal(String new_user); public int create_list(int count, IE.Iona.Orbix2.CORBA.NVListHolder hnew_list); public int create_operation_list( IE.Iona.Orbix2._OperationDefRef oper, IE.Iona.Orbix2.CORBA.NVListHolder hnew_list); public int send_multiple_requests_deferred( _sequence_Request requests) throws CORBAException; public int send_multiple_requests_oneway( _sequence_Request requests) throws CORBAException; public int get_next_response( IE.Iona.Orbix2.CORBA.RequestHolder hrequest) throws CORBAException; public boolean poll_next_response() throws SystemException; public IT_reqTransformer setMyReqTransformer( IT_reqTransformer new_transform); public IT_reqTransformer getMyReqTransformer(); public void setHostPort(String hostname, int port); public int getHostPort(String hostname); public String myHost(); public String myServer(); public void setServerName(String serverName) throws SystemException; public void finalize(); // Object Methods public static ORB IT_create(); public static ORB _nil(); }
CORBA.BOA
public _sequence_String baseInterfacesOf(String derived) throws SystemException;
derived
. The interface derived
is returned in the sequence, since it is considered a base interface of itself.
CORBA.ORB.isBaseInterfaceOf()
boolean collocated();
true
if collocation is set and returns false
otherwise.
CORBA.ORB.collocated(boolean turnOn)
CORBA.BaseObject._isRemote()
boolean collocated(boolean turnOn);
turnOn
is set to true
. If collocation is enforced, binding to objects outside of the current process' address space is prevented. If set to false
, the lookup mechanism will allow binding outside of the current address space. By default, collocation is not set.
CORBA.ORB.collocated()
CORBA.BaseObject._isRemote()
public int create_list(int count,
IE.Iona.Orbix2.CORBA.NVListHolder hnew_list);
NVList
, stored in NVListHolder
object hnew_list
, of size count
to contain NamedValue
objects. A NamedValue
object can be used as a parameter type or as a way to describe arguments to a request when using the Dynamic Invocation Interface.
1
if successful, 0
otherwise.
CORBA.NVList
CORBA.ORB.create_operation_list()
CORBA.NamedValue CORBA.Request
public int create_operation_list(
IE.Iona.Orbix2._OperationDefRef oper,
IE.Iona.Orbix2.CORBA.NVListHolder hnew_list);
NVList
, held in the NVListHolder
parameter hnew_list
, initialised with the argument descriptions for the operation specified in oper
. The returned NVList
is of the correct length (with one element per argument), and each NamedValue
element of the list has a valid name and valid flags (denoting the argument passing mode). The value (of type CORBA.Any
) of the NamedValue
has a valid type (denoting the type of the argument). The value of the argument is not filled in.
1
if successful, 0
otherwise.
-R
switch.
CORBA.NVList
CORBA.Any
CORBA.create_list()
CORBA.NamedValue
public int defaultTxTimeout(int val);
The value set by this method is ignored when making a connection between a client and a server. It comes into effect only when this connection has been established.
COMM_FAILURE
exception.
public void finalize();
CORBA.LoaderClass.save()
on the loaders for all objects in an application.
CORBA.LoaderClass.save()
public Context get_default_context();
CORBA.Context
object, representing the process' default context. See CORBA.Context
for an explanation of the default context.
CORBA.Context
public int getHostPort(String hostname);
hostname
.
CORBA.ORB.setHostPort()
public int get_next_response( IE.Iona.Orbix2.CORBA.RequestHolder hrequest) throws CORBAException;
CORBA.send_multiple_requests()
call. The order in which responses are returned is not necessarily related to the order in which the requests are completed.
1
if successful, returns 0
otherwise.
CORBA.ORB.send_multiple_requests()
CORBA.Request.get_response()
CORBA.Request.send_deferred()
public String get_principal();
CORBA.ORB.set_principal()
public IT_reqTransformer getMyReqTransformer();
IT_reqTransformer
object associated with the current process. IT_reqTransformer
is a class which allows OrbixWeb requests to be modified immediately before transmission on the network and immediately after reception. See CORBA.IT_reqTransformer
for details.
CORBA.ORB.setMyReqTransformer()
CORBA.IT_reqTransformer
public boolean isBaseInterfaceOf(String derived,
String maybeABase)
throws SystemException;
maybeABase
is a base interface of the interface named in derived
.
true
if maybeABase
is a base interface of derived
(or maybeABase
and derived
are the same interface) and returns false
otherwise.
CORBA.ORB.baseInterfacesof()
public int maxConnectRetries(int retries);
maxConnectRetries()
sets the maximum number of retries. The default number of retries is ten.As an alternative, the
IT_CONNECT_ATTEMPTS
entry in the OrbixWeb configuration file may be used to control the maximum number of retries. The value set by maxConnectRetries()
takes precedence over this. Only if it is set to zero will the IT_CONNECT_ATTEMPTS
value be used.
COMM_FAILURE
to the client application if the server cannot be contacted within the maximum number of retries.
public String myHost();
_CORBA.Orbix
object is located.
CORBA.ORB.myServer()
public String myServer();
_CORBA.Orbix
object was created. If called from a client it returns the process identifier in string form.
CORBA.ORB.myHost()
CORBA.ORB.setServerName()
public boolean noReconnectOnFailure(boolean b);
When a server exits while a client is still connected, the next invocation by the client will raise a system exception of type
COMM_FAILURE
. If the client attempts another invocation, OrbixWeb will automatically try to re-establish the connection. This default behaviour can be changed by passing the value
true
to the method CORBA.ORB.noReconnectOnFailure()
. Then, all client attempts to contact a server subsequent to closure of the communications channel will raise a COMM_FAILURE
system exception.
CORBA.ORB.maxConnectRetries()
public String object_to_string(
IE.Iona.Orbix2.CORBA._ObjectRef oref)
throws SystemException;
oref
is an OrbixWeb object reference, then the resulting String
will conform to the Orbix communications protocol object reference format. If oref
is an Interoperable Object Reference, then the return value will be a stringified IOR.The Orbix communications protocol defines the following object reference format:
:\host:serverName:marker:IR_host:IR_Server:interfaceMarker
These fields are as follows:
CORBA.ORB.string_to_object()
CORBA.BaseObject._object_to_string()
public boolean pingDuringBind(boolean pingOn);
_bind()
raises an exception if the object on which the _bind()
is attempted is unknown to OrbixWeb. Doing so requires OrbixWeb to ping the desired object (the ping operation is defined by OrbixWeb and it has no effect on the target object). The pinging will cause the target server process to be activated if necessary, and will confirm that this server recognises the target object. Pinging can be disabled using pingDuringBind()
, passing false
to the parameter pingOn
.A programmer may wish to disable pinging to improve efficiency by reducing the overall number of remote invocations.
Note that if
pingDuringBind(false)
is called:
_bind()
to an unavailable object will not immediately raise an exception, but subsequent requests using the object reference returned from _bind()
will fail by raising a system exception (INV_OBJREF
).
_bind()
, then the _bind()
will not itself make any remote calls; it simply sets up a proxy with the required fields.
_bind()
does not interact with that server to determine if the required object exists within it.
public boolean poll_next_response() throws SystemException;
CORBA.ORB.send_multiple_requests_oneway()
or CORBA.ORB.send_multiple_requests_deferred()
call have completed successfully. The method returns immediately.Alternatively the method
CORBA.Request.get_next_response()
may be called on the individual Request
objects in the sequence of Request
s passed to send_multiple_requests_oneway()
and send_multiptle_requests_deferred()
.
CORBA.ORB.get_next_response() CORBA.ORB.send_multiple_requests_oneway() CORBA.Request.poll_response()
public int send_multiple_requests_deferred( _sequence_Request requests) throws CORBAException;
CORBA.get_next_response()
or CORBA.Request.get_response()
to determine the outcome of the requests.
requests |
A sequence of requests.
|
1
if successful, returns 0
otherwise.
CORBA.ORB.send_multiple_requests_oneway()
CORBA.Request.get_response()CORBA.Request.send_deferred()
CORBA.ORB.send_multiple_requests_oneway() CORBA.ORB.poll_next_response()
public int send_multiple_requests_oneway( _sequence_Request requests) throws CORBAException;
1
if successful, 0
otherwise.
CORBA.Request.send_oneway()
CORBA.ORB.send_multiple_requests_deferred()
public int setDiagnostics(int level);
Level
|
Output
|
---|---|
0
|
No diagnostics
|
1
|
Simple diagnostics (this is the default)
|
2
|
Full diagnostics
|
The full diagnostic messages have the form:
[hour:minute:second.millisecond server@host event-description]
An event could be an operation request or a connection or disconnection from a client.
An interleaved history of activity across the distributed system could be obtained from the full diagnostic output, say, from a client to a server, by redirecting the diagnostic messages from both the client and the server to files and then sorting a merged copy of these files.
public void setHostPort(String hostname, int port);
hostname
. This allows the application programmer to override the default port configuration. Chapter 3, "OrbixWeb Configuration" explains how to establish the default configuration.
Notes:
CORBA defined. See Also:
CORBA.ORB.getHostPort()
public IT_reqTransformer setMyReqTransformer(IT_reqTransformer new_transform);
IT_reqTransformer
object which is to be associated with the current process. IT_reqTransformer
is a class which allows OrbixWeb requests to be modified immediately before transmission on the network and immediately after reception. See CORBA.IT_reqTransformer
for details.
IT_reqTransformer
value for the current process.
CORBA.ORB.getMyReqTransformer()
CORBA.IT_reqTransformer
public void set_principal(String new_user);
CORBA.ORB.get_principal()
public void setServerName(String serverName)
throws SystemException;
impl_is_ready()
.
CORBA.ORB.myServer()
CORBA.ORB.impl_is_ready()
CORBA.BOA.change_implementation()
public IE.Iona.Orbix2.CORBA._ObjectRef string_to_object(String s) throws SystemException;
s
to an object reference. A stringified object reference is of the form:
:\host:serverName:marker:IR_host:IR_server:interfaceMarker
See
CORBA.ORB.object_to_string()
for a description of these fields. The target object may not exist (it is not pinged).
s
is not a recognised stringified object reference format.
CORBA.ORB.string_to_object( String host, String IR_host, String ServerName, String marker, String IR_server, String interfaceMarker), CORBA.ORB.object_to_string() CORBA.ORB.pingDuringBind() CORBA.BaseObject.Object(const char* obj_ref_string); CORBA.BaseObject._isNull()
public IE.Iona.Orbix2.CORBA._ObjectRef string_to_object(
String host, String IR_host,
String ServerName, String marker,
String IR_server, String interfaceMarker)
throws SystemException;
|
The host name of the target object.
|
|
The name of a host running an Interface Repository that stores the target object's IDL definition.
|
|
The name of the target object's server.
|
|
The object's marker name.
|
|
The string "IR".
|
|
The target object's interface.
|
CORBA.ORB.string_to_object()
CORBA.ORB.object_to_string()