org.jacorb.orb.policies
Class RelativeRequestTimeoutPolicy

java.lang.Object
  extended by _RelativeRequestTimeoutPolicyLocalBase
      extended by org.jacorb.orb.policies.RelativeRequestTimeoutPolicy

public class RelativeRequestTimeoutPolicy
extends _RelativeRequestTimeoutPolicyLocalBase

Specifies a relative timeout for a CORBA request. It is an upper bound for the time it may take for a request to get from the client to the server. The timeout does not include the time needed for getting the reply back to the client.

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

Constructor Summary
RelativeRequestTimeoutPolicy(org.omg.CORBA.Any value)
          Constructs a new RelativeRequestTimeoutPolicy object from an Any value.
RelativeRequestTimeoutPolicy(long relative_expiry)
          Convenience constructor for RelativeRequestTimeoutPolicy.
 
Method Summary
 org.omg.CORBA.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelativeRequestTimeoutPolicy

public RelativeRequestTimeoutPolicy(org.omg.CORBA.Any value)
Constructs a new RelativeRequestTimeoutPolicy 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.

RelativeRequestTimeoutPolicy

public RelativeRequestTimeoutPolicy(long relative_expiry)
Convenience constructor for RelativeRequestTimeoutPolicy. 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 org.omg.CORBA.Policy copy()

destroy

public void destroy()