org.jacorb.orb.policies
Class RelativeRoundtripTimeoutPolicy

java.lang.Object
  extended by org.omg.CORBA.LocalObject
      extended by org.omg.Messaging._RelativeRoundtripTimeoutPolicyLocalBase
          extended by org.jacorb.orb.policies.RelativeRoundtripTimeoutPolicy
All Implemented Interfaces:
java.io.Serializable, LocalInterface, Object, Policy, PolicyOperations, IDLEntity, RelativeRoundtripTimeoutPolicy, RelativeRoundtripTimeoutPolicyOperations

public class RelativeRoundtripTimeoutPolicy
extends _RelativeRoundtripTimeoutPolicyLocalBase

Specifies a relative timeout for a CORBA roundtrip. It is an upper bound for the time it may take for a request to reach the server, be processed, and the reply delivered back to the client.

Version:
$Id: RelativeRoundtripTimeoutPolicy.java,v 1.7 2007/02/14 09:49:53 andre.spiegel Exp $
Author:
Andre Spiegel spiegel@gnu.org
See Also:
Serialized Form

Constructor Summary
RelativeRoundtripTimeoutPolicy(Any value)
          Constructs a new RelativeRoundtripTimeoutPolicy object from an Any value.
RelativeRoundtripTimeoutPolicy(long relative_expiry)
          Convenience constructor for RelativeRoundtripTimeoutPolicy.
 
Method Summary
 Policy copy()
           
 void destroy()
           
 int policy_type()
           
 long relative_expiry()
          Returns the duration of this timeout, in CORBA time units (100 nanosecond resolution).
 
Methods inherited from class org.omg.Messaging._RelativeRoundtripTimeoutPolicyLocalBase
_ids
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

RelativeRoundtripTimeoutPolicy

public RelativeRoundtripTimeoutPolicy(Any value)
Constructs a new RelativeRoundtripTimeoutPolicy object from an Any value. This is the official CORBA way of constructing this policy (via orb.create_policy()), but JacORB also has a convenience constructor that directly takes the timeout value as a parameter.

Parameters:
value - an Any that contains the timeout as a CORBA "unsigned long long" value (use Any.insert_ulonglong()). The timeout is specified in CORBA time units (100 nanosecond resolution). If you have a value in milliseconds, multiply that by 10,000.

RelativeRoundtripTimeoutPolicy

public RelativeRoundtripTimeoutPolicy(long relative_expiry)
Convenience constructor for RelativeRoundtripTimeoutPolicy. This constructor is JacORB-specific, non-portable, but it allows you to create a policy object in a single line of code, rather than going via the ORB and stuffing the timeout value into an Any.

Parameters:
relative_expiry - the duration of this timeout, in CORBA time units (100 nanosecond resolution). If you have a value in milliseconds, multiply that by 10,000.
Method Detail

relative_expiry

public long relative_expiry()
Returns the duration of this timeout, in CORBA time units (100 nanosecond resolution). To convert it to milliseconds, divide by 10,000.


policy_type

public int policy_type()

copy

public Policy copy()

destroy

public void destroy()