com.sun.jini.phoenix
Class LocalAccess

java.lang.Object
  extended by com.sun.jini.phoenix.LocalAccess

 class LocalAccess
extends Object

Definition of an access control only allowing calls from the local host.

Since:
2.0
Author:
Sun Microsystems, Inc.

Field Summary
private static Map cache
           
 
Constructor Summary
private LocalAccess()
           
 
Method Summary
static void check()
          Checks whether a call was made by a local host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

private static Map cache
Constructor Detail

LocalAccess

private LocalAccess()
Method Detail

check

public static void check()
Checks whether a call was made by a local host. Specifically, this means that if, in the dispatched call, there is a ServerContext and it contains an element that is an instance of ClientHost, then if the InetAddress returned by ClientHost.getClientHost is not a local network interface (according to NetworkInterface.getByInetAddress) or not a loopback address (according to NetworkInterface.isLoopBackAddress), the call will be rejected; in all other cases, the call will be accepted.

Throws:
AccessControlException - when the origin is not a local host


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.