[java-identity-provider COMMIT] in /trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config: AbstractPr...

noreply at shibboleth.net noreply at shibboleth.net
Thu Feb 20 22:46:36 EST 2014


Author: scantor
Date: Thu Feb 20 22:46:36 2014
New Revision: 5429

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5429&view=rev
Log:
Add message handler slots for dynamically resolved handlers.

Modified:
    trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java
    trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java

Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java?rev=5429&r1=5428&r2=5429&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/AbstractProfileConfiguration.java Thu Feb 20 22:46:36 2014
@@ -20,6 +20,8 @@
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
+import org.opensaml.messaging.handler.MessageHandler;
+
 import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
@@ -35,6 +37,12 @@
     /** Whether this profile is enabled. */
     private boolean enabled;
 
+    /** Inbound message handler. */
+    @Nullable private MessageHandler inboundHandler;
+
+    /** Outbound message handler. */
+    @Nullable private MessageHandler outboundHandler;
+    
     /** The security configuration for this profile. */
     @Nullable private SecurityConfiguration securityConfiguration;
 
@@ -86,6 +94,36 @@
 
     /** {@inheritDoc} */
     @Override
+    @Nullable public MessageHandler getInboundMessageHandler() {
+        return inboundHandler;
+    }
+
+    /**
+     * Set the inbound message handler to run.
+     * 
+     * @param handler inbound message handler
+     */
+    public void setInboundHandler(@Nullable final MessageHandler handler) {
+        inboundHandler = handler;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    @Nullable public MessageHandler getOutboundMessageHandler() {
+        return outboundHandler;
+    }
+
+    /**
+     * Set the outbound message handler to run.
+     * 
+     * @param handler outbound message handler
+     */
+    public void setOutboundHandler(@Nullable final MessageHandler handler) {
+        outboundHandler = handler;
+    }
+
+    /** {@inheritDoc} */
+    @Override
     public int hashCode() {
         return id.hashCode();
     }

Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java?rev=5429&r1=5428&r2=5429&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/ProfileConfiguration.java Thu Feb 20 22:46:36 2014
@@ -19,6 +19,8 @@
 
 import javax.annotation.Nullable;
 
+import org.opensaml.messaging.handler.MessageHandler;
+
 import net.shibboleth.utilities.java.support.component.IdentifiableComponent;
 
 /** Represents the configuration of a particular communication profile. */
@@ -29,12 +31,26 @@
      * 
      * @return whether this profile is enabled for use
      */
-    public boolean isEnabled();
+    boolean isEnabled();
+    
+    /**
+     * Get the inbound message handler to execute at the beginning of profile processing.
+     * 
+     * @return  a message handler, or null
+     */
+    @Nullable MessageHandler getInboundMessageHandler();
+    
+    /**
+     * Get the outbound message handler to execute at the end of profile processing.
+     * 
+     * @return  a message handler, or null
+     */
+    @Nullable MessageHandler getOutboundMessageHandler();
     
     /**
      * Get the {@link SecurityConfiguration} to use with this profile.
      * 
      * @return security configuration to use with this profile
      */
-    @Nullable public SecurityConfiguration getSecurityConfiguration();
+    @Nullable SecurityConfiguration getSecurityConfiguration();
 }



More information about the commits mailing list