Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.alien.enterpriseRFID.reader
Class TimedSocket

    java.lang.Object
      com.alien.enterpriseRFID.reader.TimedSocket

public class TimedSocket
extends java.lang.Object

This class offers a timeout feature on socket connections. A maximum length of time allowed for opening a connection can be specified, along with a host and port.

Author:
  David Reilly

Constructor Summary
`TimedSocket()`

Method Summary
`static java.net.Socket` | `getSocket(java.net.InetAddress addr, int port, int delay)` Attempts to connect to a service at the specified address and port, for a specified maximum amount of time.
`static java.net.Socket` | `getSocket(java.lang.String host, int port, int delay)` Attempts to connect to a service at the specified address and port, for a specified maximum amount of time.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimedSocket

    public TimedSocket()

Method Detail

### getSocket

    public static java.net.Socket getSocket(java.net.InetAddress addr,
                                            int port,
                                            int delay)
                                     throws java.io.InterruptedIOException,
                                            java.io.IOException

  Attempts to connect to a service at the specified address and port, for a specified maximum amount of time.

  Parameters:
    `addr` - Address of host
    `port` - Port of service
    `delay` - Delay in milliseconds
  Throws:
    `java.io.InterruptedIOException`
    `java.io.IOException`

### getSocket

    public static java.net.Socket getSocket(java.lang.String host,
                                            int port,
                                            int delay)
                                     throws java.io.InterruptedIOException,
                                            java.io.IOException

  Attempts to connect to a service at the specified address and port, for a specified maximum amount of time.

  Parameters:
    `host` - Hostname of machine
    `port` - Port of service
    `delay` - Delay in milliseconds
  Throws:
    `java.io.InterruptedIOException`
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD