Class UnicastSocketTimeout

java.lang.Object
com.sun.jini.discovery.UnicastSocketTimeout
All Implemented Interfaces:
Serializable, InvocationConstraint

public final class UnicastSocketTimeout extends Object implements InvocationConstraint, Serializable
Represents a constraint on the timeout set on sockets used for unicast discovery. Lookup services and discovery clients can use this constraint to specify the maximum length of time that reads of unicast discovery data will block.
Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
  • Constructor Details

    • UnicastSocketTimeout

      public UnicastSocketTimeout(int timeout)
      Creates a UnicastSocketTimeout constraint for the given timeout.
      Parameters:
      timeout - the socket timeout
      Throws:
      IllegalArgumentException - if the given timeout is negative
  • Method Details

    • getTimeout

      public int getTimeout()
      Returns the socket timeout.
      Returns:
      the socket timeout
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object