org.ow2.petals.jbi.management.task.deployment.deploy
Class RegisterAllConnectionTask

java.lang.Object
  extended by org.ow2.petals.jbi.management.task.AbstractLoggableTask
      extended by org.ow2.petals.jbi.management.task.deployment.deploy.RegisterAllConnectionTask
All Implemented Interfaces:
Task

public class RegisterAllConnectionTask
extends AbstractLoggableTask

This task registers connections if exist
Inputs : Jbi
The task has got a non-robust approach : it stops at the first subtask failed
and have the undo capability.

Author:
ofabre - EBM Websourcing, Frederic Gardes - eBM Websourcing

Field Summary
protected  EndpointRegistry endpointRegistry
           
 
Fields inherited from class org.ow2.petals.jbi.management.task.AbstractLoggableTask
log
 
Constructor Summary
RegisterAllConnectionTask(org.ow2.petals.util.LoggingUtil log, EndpointRegistry endpointRegistry)
           
 
Method Summary
 void execute(Context context)
          Launch the task with the given context.
protected  void registerConnection(org.ow2.petals.jbi.descriptor.original.generated.Connection connection, org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor)
          Register a connection into the endpoint registry of the JBI container
protected  void removeConnection(org.ow2.petals.jbi.descriptor.original.generated.Connection connection)
          Remove a connection registered during the SA deployment process
 void undo(Context context)
          Reverse the task in order to retrieve the environ state before execution of this task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endpointRegistry

protected EndpointRegistry endpointRegistry
Constructor Detail

RegisterAllConnectionTask

public RegisterAllConnectionTask(org.ow2.petals.util.LoggingUtil log,
                                 EndpointRegistry endpointRegistry)
Method Detail

execute

public void execute(Context context)
             throws java.lang.Exception
Description copied from interface: Task
Launch the task with the given context. Task can modify information included in this context during execution.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task processing

registerConnection

protected void registerConnection(org.ow2.petals.jbi.descriptor.original.generated.Connection connection,
                                  org.ow2.petals.jbi.descriptor.original.generated.Jbi descriptor)
                           throws ManagementException
Register a connection into the endpoint registry of the JBI container

Parameters:
connection - The Connection to register
descriptor - the service assembly descriptor
Throws:
ManagementException - when container fails to register a connection into the endpoint registry

undo

public void undo(Context context)
          throws java.lang.Exception
Description copied from interface: Task
Reverse the task in order to retrieve the environ state before execution of this task.

Parameters:
context - the execution context handling input and output information
Throws:
java.lang.Exception - if an error occurs during Task unprocessing

removeConnection

protected void removeConnection(org.ow2.petals.jbi.descriptor.original.generated.Connection connection)
                         throws java.lang.Exception
Remove a connection registered during the SA deployment process

Parameters:
connection - a Connection to remove
Throws:
java.lang.Exception - if problem occurs during the deletion of a specific connection


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