Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
borderColor#6699ff
bgColor#ffffff
titleBGColor#D5EFFF
titleRuntime Context Interfaces
borderStylesolid
public interface RuntimeContext<M> extends Lifecycle {
    /**
     * Create an intercetor for the model in the invocation chain. For a reference binding,
     * the interceptor is responsible to make the outbound invocation over the binding protocol.
     * For a service binding, the interceptor is responsible to dispatch the incoming call to
     * the target component service that the service promotes. For a component implementation,
     * the interceptor will be responsible for calling the implementation logic for the given
     * component.
     * 
     * @param model The service that defines the binding
     * @param operation The operation that the interceptor will handle
     * @param isCallback A flag to tell if the operation is for the callback
     * @return An interceptor that handles the invocation logic, null should be returned if no 
     * interceptor is required
     */
    Interceptor createInterceptor(M model, Operation operation, boolean isCallback);
    
    /**
     * Get the effective interface contract imposed by the binding or implementation. For
     * example, it will be interface contract introspected from the WSDL portType used by the
     * endpoint for a WebService binding.
     * @param model The model object
     * 
     * @return The effective interface contract
     */
    InterfaceContract getEffectiveInterfaceContract(M model);

}

public interface ReferenceBindingContext extends RuntimeContext<Reference> {
    /**
     * @param wire
     */
    void setRuntimeWire(RuntimeWire wire);
    /**
     * @return
     */
    RuntimeWire getWire();    
}

public interface ServiceBindingContext extends RuntimeContext<Service> {
    /**
     * @param wire
     */
    void setRuntimeWire(RuntimeWire wire);
    /**
     * @return
     */
    RuntimeWire getWire();    
}

public interface ImplementationContext extends RuntimeContext<Component> {
}