use of java.security.Permission in project hazelcast by hazelcast.
the class ActionConstantsTest method getPermission_AtomicLong.
@Test
public void getPermission_AtomicLong() {
Permission permission = ActionConstants.getPermission("foo", AtomicLongService.SERVICE_NAME);
assertNotNull(permission);
assertTrue(permission instanceof AtomicLongPermission);
}
use of java.security.Permission in project hazelcast by hazelcast.
the class ActionConstantsTest method getPermission_Topic.
@Test
public void getPermission_Topic() {
Permission permission = ActionConstants.getPermission("foo", TopicService.SERVICE_NAME);
assertNotNull(permission);
assertTrue(permission instanceof TopicPermission);
}
use of java.security.Permission in project hazelcast by hazelcast.
the class ActionConstantsTest method getPermission_Cache.
@Test
public void getPermission_Cache() {
Permission permission = ActionConstants.getPermission("foo", ICacheService.SERVICE_NAME);
assertNotNull(permission);
assertTrue(permission instanceof CachePermission);
}
use of java.security.Permission in project hazelcast by hazelcast.
the class ActionConstantsTest method getPermission_ReplicatedMap.
@Test
public void getPermission_ReplicatedMap() {
Permission permission = ActionConstants.getPermission("foo", ReplicatedMapService.SERVICE_NAME);
assertNotNull(permission);
assertTrue(permission instanceof ReplicatedMapPermission);
}
use of java.security.Permission in project j2objc by google.
the class HttpURLConnection method getPermission.
/**
* Returns a {@link SocketPermission} object representing the
* permission necessary to connect to the destination host and port.
*
* @exception IOException if an error occurs while computing
* the permission.
*
* @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
public Permission getPermission() throws IOException {
int port = url.getPort();
port = port < 0 ? 80 : port;
String host = url.getHost() + ":" + port;
Permission permission = new SocketPermission(host, "connect");
return permission;
}
Aggregations