org.ow2.petals.jbi.messaging.routing.module
Class AuthorizationModule

java.lang.Object
  extended by org.ow2.petals.jbi.messaging.routing.module.AuthorizationModule
All Implemented Interfaces:
SenderModule

public class AuthorizationModule
extends java.lang.Object
implements SenderModule

A router module for authorizing routing. The accessible endpoint/service/operation are defined as accessible in a configuration file (authorization.cfg). This file must be available in the petals classpath(generally under the conf directory). The incoming message must contains a security subject where principals match with the defined ones.

Since:
2.2
Author:
Christophe HAMERLING - eBM WebSourcing

Field Summary
static java.lang.String CONFIGURATION
           
protected  org.ow2.petals.util.LoggingUtil log
          Logger wrapper.
 
Constructor Summary
AuthorizationModule()
           
 
Method Summary
protected  void authorizeSend(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchange)
          Authorize to send the message.
 void electEndpoints(java.util.Map<ServiceEndpoint,TransportSendContext> electedEndpoints, ComponentContext sourceComponentContext, org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
          Elect a list of candidate endpoints to be destination of the exchange.
protected  void start()
          Start the Fractal component
protected  void stop()
          Stop the Fractal component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.ow2.petals.util.LoggingUtil log
Logger wrapper.


CONFIGURATION

public static final java.lang.String CONFIGURATION
See Also:
Constant Field Values
Constructor Detail

AuthorizationModule

public AuthorizationModule()
Method Detail

start

protected void start()
              throws java.io.IOException,
                     java.net.URISyntaxException,
                     AuthorizationException
Start the Fractal component

Throws:
java.io.IOException
java.net.URISyntaxException
AuthorizationException

stop

protected void stop()
             throws RoutingException
Stop the Fractal component

Throws:
RoutingException

electEndpoints

public void electEndpoints(java.util.Map<ServiceEndpoint,TransportSendContext> electedEndpoints,
                           ComponentContext sourceComponentContext,
                           org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
                    throws RoutingException
Description copied from interface: SenderModule
Elect a list of candidate endpoints to be destination of the exchange.

Specified by:
electEndpoints in interface SenderModule
exchangeDecorator - the exchange decorator to send
Throws:
RoutingException

authorizeSend

protected void authorizeSend(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchange)
                      throws RoutingException
Authorize to send the message. This authorization is based on the message exchange subject. If the subject principals match with the local authorization map, the message can be send to the foreign service/operation.

Parameters:
source -
exchange -
timeOut -
Throws:
RoutingException - if the subject is null or if the user is not authorized to send message to the JBI service (ie not found in authorization map).


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.