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

## rabbit.util
Class Access

    java.lang.Object
      rabbit.util.Access

public class Access
extends java.lang.Object

A class to handle access to ip ranges.

Field Summary
`static int` | `ADMIN` allowed to access metapages
`static int` | `FTP` allowed to ftp
`static int` | `GOPHER` allowed to run gopher
`static int` | `HTTP` allowed to access standard http (ordinary webpages)
`static int` | `HTTPS` allowed to run secure transactions
`static int` | `NONE` No access at all
`static int` | `WAIS` allowed to run wais

Constructor Summary
`Access(int type, java.net.InetAddress lowipa, java.net.InetAddress highipa)` Create a new Access with given ip-range and given type
`Access(java.lang.String type, java.net.InetAddress lowip, java.net.InetAddress highip)` Create a new Access with given ip-range and given type

Method Summary
`int` | `getType()` return the accesstype we have for this range
`boolean` | `inrange(java.net.InetAddress ia)` check if a given ip is in this accessrange
`void` | `setType(int newType)` sets the accesstype we have for this range
`java.lang.String` | `toString()` get the string representation of this access.

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

Field Detail

### NONE

    public static final int NONE

  No access at all

  See Also:
    Constant Field Values

### ADMIN

    public static final int ADMIN

  allowed to access metapages

  See Also:
    Constant Field Values

### HTTP

    public static final int HTTP

  allowed to access standard http (ordinary webpages)

  See Also:
    Constant Field Values

### HTTPS

    public static final int HTTPS

  allowed to run secure transactions

  See Also:
    Constant Field Values

### FTP

    public static final int FTP

  allowed to ftp

  See Also:
    Constant Field Values

### GOPHER

    public static final int GOPHER

  allowed to run gopher

  See Also:
    Constant Field Values

### WAIS

    public static final int WAIS

  allowed to run wais

  See Also:
    Constant Field Values

Constructor Detail

### Access

    public Access(java.lang.String type,
                  java.net.InetAddress lowip,
                  java.net.InetAddress highip)

  Create a new Access with given ip-range and given type

Parameters:
  `type` - one of http, admin, ftp, gopher, https, wais (caseinsensitive)
  `lowip` - the lowest ip in the range
  `highip` - the highest ip in the range

### Access

    public Access(int type,
                  java.net.InetAddress lowipa,
                  java.net.InetAddress highipa)

  Create a new Access with given ip-range and given type

Parameters:
  `type` - one of the constants (HTTP, FTP, ADMIN etc) or a OR (|) of them.
  `lowipa` - the lowest ip in the range
  `highipa` - the highest ip in the range

Method Detail

### inrange

    public boolean inrange(java.net.InetAddress ia)

  check if a given ip is in this accessrange

  Parameters:
    `ia` - the ip we are testing.
  Returns:
    true if ia is in the range (inclusive), false otherwise

### getType

    public int getType()

  return the accesstype we have for this range

### setType

    public void setType(int newType)

  sets the accesstype we have for this range

  Parameters:
    `newType` - the new access for this range.

### toString

    public java.lang.String toString()

  get the string representation of this access.

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