public final class WrapperUserEventPermission
extends java.security.BasicPermission
Some of these permissions can result in performance degredations if used impropperly.
The following are examples of how to specify the permission within a policy file.
grant codeBase "file:../lib/-" { // Grant various permissions to a specific service. permission org.tanukisoftware.wrapper.security.WrapperEventPermission "service"; permission org.tanukisoftware.wrapper.security.WrapperEventPermission "service, core"; permission org.tanukisoftware.wrapper.security.WrapperEventPermission "*"; };
Possible eventTypes include the following:
Permission Event Type Name | What the Permission Allows | Risks of Allowing this Permission |
---|---|---|
service | Register to obtain events whenever the Wrapper service receives any service events. | Malicious code could receive this event and never return and thus cause performance and timeout problems with the Wrapper. Normal use of these events are quite safe however. |
control | Register to obtain events whenever the Wrapper receives any system control signals. | Malicious code could trap and consome control events, thus preventing an application from being shut down cleanly. |
core | Register to obtain events on the core workings of the Wrapper. | Malicious code or even well meaning code can greatly affect the performance of the Wrapper simply by handling these methods slowly. Some of these events are fired from within the core timing code of the Wrapper. They are useful for testing and performance checks, but in general they should not be used by most applications. |
Constructor and Description |
---|
WrapperUserEventPermission(java.lang.String action)
Creates a new WrapperEventPermission for the specified service.
|
WrapperUserEventPermission(java.lang.String name,
java.lang.String action)
Creates a new WrapperEventPermission for the specified service.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getActions()
Return the canonical string representation of the eventTypes.
|
boolean |
implies(java.security.Permission p2)
Checks if this WrapperEventPermission object "implies" the
specified permission.
|
public WrapperUserEventPermission(java.lang.String action)
action
- The event type or event types to be registered.public WrapperUserEventPermission(java.lang.String name, java.lang.String action)
name
- Name of the event.action
- The event type or event types to be registered.public java.lang.String getActions()
getActions
in class java.security.BasicPermission
public boolean implies(java.security.Permission p2)
More specifically, this method returns true if:
implies
in class java.security.BasicPermission
p2
- the permission to check against.Copyright 1999, 2024 Tanuki Software Inc., All Rights Reserved.