org.acme.security
Class AuditService

java.lang.Object
  extended by org.acme.security.AuditService

@Service
@Singleton
public class AuditService
extends Object

This is a dummy security service that should be available to some code (Alice) but not directly available to other code (Mallory). That's because Mallory would spam the service and do something evil to it, while Alice would use the service as intended.

Author:
jwells

Constructor Summary
AuditService()
           
 
Method Summary
 void auditLog(String logMe)
          Securely (not really) audits a message
 List<String> getAuditLogs()
          Gets everything that has been logged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditService

public AuditService()
Method Detail

auditLog

public void auditLog(String logMe)
Securely (not really) audits a message

Parameters:
logMe - The message to log

getAuditLogs

public List<String> getAuditLogs()
Gets everything that has been logged

Returns:
A non-null (but possibly empty) set of logged messages


Copyright © 2013 Oracle Corporation. All Rights Reserved.