Skip to content

Commit

Permalink
hessian javadoc
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.caucho.com/home/svn/svnroot/resin/trunk/modules/hessian@10492 9c94448d-38f1-0310-a231-d98308ff1ebf
  • Loading branch information
ferg committed Mar 29, 2017
1 parent cf851f5 commit e56aae0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/com/caucho/hessian/io/ClassFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public void setWhitelist(boolean isWhitelist)
initAllow();
}

/**
* Allow a class or package based on a pattern.
*
* Examples: "java.util.*", "com.foo.io.Bean"
*/
public void allow(String pattern)
{
initAllow();
Expand All @@ -118,6 +123,11 @@ public void allow(String pattern)
}
}

/**
* Deny a class or package based on a pattern.
*
* Examples: "java.util.*", "com.foo.io.Bean"
*/
public void deny(String pattern)
{
initAllow();
Expand Down
15 changes: 15 additions & 0 deletions src/com/caucho/hessian/io/HessianFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,31 @@ public SerializerFactory getSerializerFactory()
return _serializerFactory;
}

/**
* Enable whitelist deserialization mode. Only classes matching the whitelist
* will be allowed.
*/
public void setWhitelist(boolean isWhitelist)
{
getSerializerFactory().getClassFactory().setWhitelist(isWhitelist);
}

/**
* Allow a class or package based on a pattern.
*
* Examples: "java.util.*", "com.foo.io.Bean"
*/
public void allow(String pattern)
{
getSerializerFactory().getClassFactory().allow(pattern);
}


/**
* Deny a class or package based on a pattern.
*
* Examples: "java.util.*", "com.foo.io.Bean"
*/
public void deny(String pattern)
{
getSerializerFactory().getClassFactory().deny(pattern);
Expand Down
2 changes: 2 additions & 0 deletions src/com/caucho/hessian/server/HessianServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ public void setWhitelist(boolean isWhitelist)

/**
* Adds an allow rule to the deserializer
*
* Examples: "java.util.*", "com.foo.io.Bean"
*/
public void allow(String pattern)
{
Expand Down

0 comments on commit e56aae0

Please sign in to comment.