public class WrapperEventPermission
extends java.security.Permission
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. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EVENT_TYPE_CONTROL |
static java.lang.String |
EVENT_TYPE_CORE |
static java.lang.String |
EVENT_TYPE_REMOTE_CONTROL |
static java.lang.String |
EVENT_TYPE_SERVICE |
Constructor and Description |
---|
WrapperEventPermission(java.lang.String eventTypes)
Creates a new WrapperEventPermission for the specified service.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks two Permission objects for equality.
|
java.lang.String |
getActions()
Return the canonical string representation of the eventTypes.
|
int |
hashCode()
Returns the hash code value for this object.
|
boolean |
implies(java.security.Permission p2)
Checks if this WrapperEventPermission object "implies" the
specified permission.
|
java.security.PermissionCollection |
newPermissionCollection()
Returns an custom WECollection implementation of a PermissionCollection.
|
public static java.lang.String EVENT_TYPE_SERVICE
public static java.lang.String EVENT_TYPE_CONTROL
public static java.lang.String EVENT_TYPE_REMOTE_CONTROL
public static java.lang.String EVENT_TYPE_CORE
public WrapperEventPermission(java.lang.String eventTypes)
eventTypes
- The event type or event types to be registered.public boolean equals(java.lang.Object obj)
Do not use the equals method for making access control decisions; use the implies method.
equals
in class java.security.Permission
obj
- The object we are testing for equality with this object.public java.lang.String getActions()
getActions
in class java.security.Permission
public boolean implies(java.security.Permission p2)
More specifically, this method returns true if:
implies
in class java.security.Permission
p2
- the permission to check against.public java.security.PermissionCollection newPermissionCollection()
newPermissionCollection
in class java.security.Permission
public int hashCode()
hashCode
in class java.security.Permission
Copyright 1999, 2024 Tanuki Software Inc., All Rights Reserved.