|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.sdsc.inca.protocol.MessageHandler
public abstract class MessageHandler
The MessageHandler class should help guide the creation of all of the message handlers for each Inca server.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
logger that can be used by all MessageHandlers. |
Constructor Summary | |
---|---|
MessageHandler()
|
Method Summary | |
---|---|
static void |
errorReply(ProtocolWriter writer,
java.lang.String msg)
A convenience method that logs and writes an error message. |
abstract void |
execute(ProtocolReader reader,
ProtocolWriter writer,
java.lang.String dn)
Service an incoming request from a specified client DN, using specified i/o streams. |
static void |
forbid(java.lang.String dn,
java.lang.String action)
Indicate that a specified DN may no longer perform a specified action. |
static boolean |
isPermitted(java.lang.String dn,
java.lang.String action)
Returns true iff a specified DN may perform a specified action. |
static void |
permit(java.lang.String dn,
java.lang.String action)
Indicate that a specified DN may perform a specified action. |
static java.lang.String[] |
permittees(java.lang.String action)
Returns the set of DNs permitted to perform a specified action, or null if no permissions have been registered for that action. |
static void |
resetPermissions()
Removes all permissions--useful for testing. |
static void |
setPermissionsPath(java.lang.String path)
Sets the path where DN permissions should be stored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
Constructor Detail |
---|
public MessageHandler()
Method Detail |
---|
public static void setPermissionsPath(java.lang.String path)
path
- path to the permissions filepublic static void forbid(java.lang.String dn, java.lang.String action)
dn
- the entity DNaction
- the action now forbidden to the DNpublic static boolean isPermitted(java.lang.String dn, java.lang.String action)
dn
- the entity DNaction
- the action to test
public static void permit(java.lang.String dn, java.lang.String action)
dn
- the entity DNaction
- the action to testpublic static java.lang.String[] permittees(java.lang.String action)
action
- the action to test
public static void resetPermissions()
public abstract void execute(ProtocolReader reader, ProtocolWriter writer, java.lang.String dn) throws java.lang.Exception
reader
- the reader connected to the clientwriter
- the writer connected to the clientdn
- the DN of the client, null if no authentication
java.lang.Exception
public static void errorReply(ProtocolWriter writer, java.lang.String msg)
writer
- the writer to use to send the error messagemsg
- the error message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |