com.sun.jini.discovery
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:
- Serialized Form
Constructor Summary |
UnicastSocketTimeout(int timeout)
Creates a UnicastSocketTimeout constraint for the given
timeout. |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
timeout
private final int timeout
- The socket timeout.
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
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
readObject
private void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.