}
}
// call the core cmd if we receive a ok return code of the hook so no other hooks are executed
if ((hRes.getResult() & HookReturnCode.OK) == HookReturnCode.OK) {
final Response response = doCoreCmd(session, command, parameters);
if ((hRes.getResult() & HookReturnCode.DISCONNECT) == HookReturnCode.DISCONNECT) {
return new Response() {
/*
* (non-Javadoc)
* @see org.apache.james.protocols.api.Response#isEndSession()
*/
public boolean isEndSession() {
return true;
}
/*
* (non-Javadoc)
* @see org.apache.james.protocols.api.Response#getRetCode()
*/
public String getRetCode() {
return response.getRetCode();
}
/*
* (non-Javadoc)
* @see org.apache.james.protocols.api.Response#getLines()
*/
public List<CharSequence> getLines() {
return response.getLines();
}
};
}
return response;
} else {