com.jivesoftware.forum.interceptor
Class VirusScanInterceptor
java.lang.Object
com.jivesoftware.forum.interceptor.VirusScanInterceptor
- All Implemented Interfaces:
- MessageInterceptor
public class VirusScanInterceptor
- extends java.lang.Object
- implements MessageInterceptor
Redirects messages with attachments to the VirusScanManager queue. The general logic flow is as follows:
- If a message contains one or more attachments, the moderation value of the message
is set to
VIRUS_CHECK_MODERATION_VALUE
, which is below the visible threshold
and will prevent the message from being viewed by other users.
- The message is added to the VirusScanManager queue where it will be scanned for viruses.
- See Also:
VirusScanManager
Field Summary |
static int |
VIRUS_CHECK_MODERATION_VALUE
The moderation value that messages will be set to (-156) while waiting to be scanned
for viruses. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VIRUS_CHECK_MODERATION_VALUE
public static int VIRUS_CHECK_MODERATION_VALUE
- The moderation value that messages will be set to (-156) while waiting to be scanned
for viruses. The value is below the visible threshold, which means that other users
will not see the message until it's finished being scanned.
VirusScanInterceptor
public VirusScanInterceptor()
VirusScanInterceptor
public VirusScanInterceptor(int objectType,
long objectID)
getType
public int getType()
- Description copied from interface:
MessageInterceptor
- Returns the type of the interceptor.
- Specified by:
getType
in interface MessageInterceptor
- Returns:
- the interceptor type.
invokeInterceptor
public void invokeInterceptor(ForumMessage message,
int type)
throws MessageRejectedException
- Description copied from interface:
MessageInterceptor
- Invokes the interceptor on the specified message. The interceptor can either modify
the message, or throw a MessageRejectedException to block it from being posted. Only a
TYPE_PRE interceptor can throw an exception.
- Specified by:
invokeInterceptor
in interface MessageInterceptor
- Parameters:
message
- the message to take action on.
- Throws:
MessageRejectedException
- if the message should be prevented from being posted.
Copyright © 1999-2006 Jive Software.