Class JabbixSecurityManager


  • public class JabbixSecurityManager
    extends java.lang.SecurityManager
    A SecurityManager implementation used to manage access to and from a Jabbix program. To set the connection permissions the two separate sets of predicates are used.
    Author:
    Paul Wolneykien
    • Constructor Summary

      Constructors 
      Constructor Description
      JabbixSecurityManager()
      Creates an instance of the manager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkAccept​(java.lang.String host, int port)
      Check the permission to accept a connection from the specified host and port using the set of predicates.
      void checkConnect​(java.lang.String host, int port)
      Check the permission to connect to the specified host and port using the set of predicates.
      java.util.Collection<ConnectionPredicate> getConnectionPredicates()
      Returns a set of connection predicates defining the permission to connect to remote hosts.
      java.util.Collection<ConnectionPredicate> getListenPredicates()
      Returns a set of connection predicates defining the permission to accept connections from remote hosts.
      void setConnectionPredicates​(java.util.Collection<ConnectionPredicate> connPreds)
      Sets a set of connection predicates defining the permission to connect to remote hosts.
      void setListenPredicates​(java.util.Collection<ConnectionPredicate> listenPreds)
      Sets a set of connection predicates defining the permission to accept connections from remote hosts.
      • Methods inherited from class java.lang.SecurityManager

        checkAccess, checkAccess, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getSecurityContext, getThreadGroup
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JabbixSecurityManager

        public JabbixSecurityManager()
        Creates an instance of the manager.
    • Method Detail

      • checkAccept

        public void checkAccept​(java.lang.String host,
                                int port)
        Check the permission to accept a connection from the specified host and port using the set of predicates. By default (the corresponding predicate set is empty), connections from all hosts are permitted. Otherwise only connections satisfying at least one of the specified predicates are allowed.
        Overrides:
        checkAccept in class java.lang.SecurityManager
      • checkConnect

        public void checkConnect​(java.lang.String host,
                                 int port)
        Check the permission to connect to the specified host and port using the set of predicates. By default (the corresponding predicate set is empty), connections to all hosts are permitted. Otherwise only connections satisfying at least one of the specified predicates are allowed.
        Overrides:
        checkConnect in class java.lang.SecurityManager
      • getConnectionPredicates

        public java.util.Collection<ConnectionPredicate> getConnectionPredicates()
        Returns a set of connection predicates defining the permission to connect to remote hosts.
        Returns:
        a set of predicates to test outcoming connections on
      • setConnectionPredicates

        public void setConnectionPredicates​(java.util.Collection<ConnectionPredicate> connPreds)
        Sets a set of connection predicates defining the permission to connect to remote hosts.
        Parameters:
        connPreds - a set of predicates to test outcoming connections on
      • setListenPredicates

        public void setListenPredicates​(java.util.Collection<ConnectionPredicate> listenPreds)
        Sets a set of connection predicates defining the permission to accept connections from remote hosts.
        Parameters:
        listenPreds - a set of predicates to test incoming connections on
      • getListenPredicates

        public java.util.Collection<ConnectionPredicate> getListenPredicates()
        Returns a set of connection predicates defining the permission to accept connections from remote hosts.
        Returns:
        a set of predicates to test incoming connections on