Example usage for org.apache.shiro.aop MethodInvocation proceed

List of usage examples for org.apache.shiro.aop MethodInvocation proceed

Introduction

In this page you can find the example usage for org.apache.shiro.aop MethodInvocation proceed.

Prototype

Object proceed() throws Throwable;

Source Link

Document

Continues the method invocation chain, or if the last in the chain, the method itself.

Usage

From source file:net.cloudkit.enterprises.infrastructure.shiro.SecurityInterceptor.java

License:Apache License

public Object invoke(MethodInvocation methodInvocation) throws Throwable {

    String clienthost = RemoteServer.getClientHost();
    // InetAddress inetAddress = java.net.InetAddress.getByName(clienthost);
    // String clentIp = inetAddress.getHostAddress();
    if (allowed != null && allowed.contains(clienthost)) {
        return methodInvocation.proceed();
    } else {/*from  w  w  w .  j a v  a  2  s  .co m*/
        throw new SecurityException("?");
    }
}