Examples of Mediator


Examples of com.l2client.animsystem.Mediator

 
  private static final Logger log = Logger.getLogger(AnimationSystemTest.class.getName());
  private String currentAnim = "";

  public void testSelf() throws MalformedURLException{
    Mediator mediator = new Mediator(getActions(), new Transitions(new String[][]{}));
    InputProvider in = new InputProvider();
    mediator.setAnimationProvider(this);
    mediator.update(0.5f);
    log.info("Animation name:"+currentAnim);
    assertTrue(currentAnim.startsWith("stand_"));
    mediator.update(10.0f);
    in.setInput(Direction.Front);
    in.setInput(Speed.Run);
    mediator.update(10.0f);
    //should still be stand, one frame coherence
    assertTrue(currentAnim.startsWith("stand_"));
    log.info("Animation name:"+currentAnim);
    mediator.setInput(in);
    mediator.update(10.0f);
    //now changed
    log.info("Animation name:"+currentAnim);
    assertTrue(currentAnim.startsWith("run"));
    mediator.update(10.0f);
    log.info("Animation name:"+currentAnim);
    assertTrue(currentAnim.startsWith("run"));
    in = new InputProvider();
    in.setInput(Direction.None);
    in.setInput(Speed.Run);//implizit overrule of speed (no direction, no speed)
    mediator.setInput(in);
    mediator.update(10.0f);
    //back to idle?
    assertTrue(currentAnim.startsWith("stand_"));
    in = new InputProvider();
    in.setInput(Enemy.Near);
    mediator.setInput(in);
    mediator.update(10.0f);
    //now changed
    log.info("Animation name:"+currentAnim);
    assertTrue(currentAnim.startsWith("ready"));
   
    mediator.update(10.0f);
    mediator.update(10.0f);
    in = new InputProvider();
    in.setInput(HurtVector.Front);
    in.setInput(Hurt.Light);
    mediator.callAction("Wounded", in);
    mediator.update(10f);
    log.info("Animation name:"+currentAnim);
    assertTrue(currentAnim.startsWith("knockback"));
   
  }
View Full Code Here

Examples of jmt.gui.jmodel.controller.Mediator

   */
  public MainWindow() {
    super(true);
    this.setIconImage(JMTImageLoader.loadImage("JMODELIcon").getImage());
    setTitle(TITLE);
    mediator = new Mediator(null, this);
    Mediator.advanced = advanced;

    //menu = new Menu(mediator);
    menu = mediator.createMenu();
    setJMenuBar(menu);
View Full Code Here

Examples of ke.go.moh.oec.lib.Mediator

    public NotifyPersonChangedTest() {
    }
   
    @BeforeClass
    public static void setUpClass() throws Exception {
        mediator = new Mediator();
    }
View Full Code Here

Examples of org.aavso.tools.vstar.ui.mediator.Mediator

  public CurrentModeANOVATool() {
  }

  @Override
  public void invoke() {
    Mediator mediator = Mediator.getInstance();

    if (!mediator.getNewStarMessageList().isEmpty()) {
      AnalysisType type = mediator.getAnalysisType();

      ObservationAndMeanPlotModel model = mediator
          .getObservationPlotModel(type);

      BinningResult binningResult = model.getBinningResult();

      String msg = binningResult.createAnovaText();
View Full Code Here

Examples of org.apache.synapse.Mediator

    }

    public static Mediator defineSequence(SynapseConfiguration config, OMElement ele,
                                          Properties properties) {

        Mediator mediator = null;
        String name = ele.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        if (name != null) {
            try {
                mediator = MediatorFactoryFinder.getInstance().getMediator(ele, properties);
                if (mediator != null) {
View Full Code Here

Examples of org.apache.synapse.Mediator

    }

    public static Mediator defineMediatorTemplate(SynapseConfiguration config, OMElement ele,
                                                  Properties properties) {

        Mediator mediator = null;
        String name = ele.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        if (name != null) {
            try {
                mediator = MediatorFactoryFinder.getInstance().getMediator(ele, properties);
                if (mediator != null) {
View Full Code Here

Examples of org.apache.synapse.Mediator

                return tm.getName();
            } else {
                element = artifactConfig.getFirstChildWithName(
                        new QName(SynapseConstants.SYNAPSE_NAMESPACE, "sequence"));
                if (element != null) {
                    Mediator mediator = MediatorFactoryFinder.getInstance().
                            getMediator(artifactConfig, properties);
                    if (mediator instanceof TemplateMediator) {
                        TemplateMediator tm = (TemplateMediator) mediator;

                        tm.setFileName((new File(fileName)).getName());
View Full Code Here

Examples of org.apache.synapse.Mediator

                return tm.getName();
            } else {
                element = artifactConfig.getFirstChildWithName(
                        new QName(SynapseConstants.SYNAPSE_NAMESPACE, "sequence"));
                if (element != null) {
                    Mediator mediator = MediatorFactoryFinder.getInstance().
                            getMediator(artifactConfig, properties);
                    if (mediator instanceof TemplateMediator) {
                        TemplateMediator tm = (TemplateMediator) mediator;

                        tm.setFileName((new File(fileName)).getName());
View Full Code Here

Examples of org.apache.synapse.Mediator

                synLog.traceTrace("Message : " + synCtx.getEnvelope());
            }
        }
        populateParameters(synCtx);
        //get the target function template and invoke by passing populated parameters
        Mediator mediator = synCtx.getSequenceTemplate(targetTemplate);
        if (mediator != null && mediator instanceof TemplateMediator) {
            return mediator.mediate(synCtx);
        }
        return false;
    }
View Full Code Here

Examples of org.apache.synapse.Mediator

            Iterator sequences = FileUtils.iterateFiles(sequencesDir, extensions, false);
            while (sequences.hasNext()) {
                File file = (File) sequences.next();
                OMElement document = getOMElement(file);
                Mediator seq = SynapseXMLConfigurationFactory.defineSequence(synapseConfig,
                        document, properties);
                if (seq != null && seq instanceof SequenceMediator) {
                    SequenceMediator sequence = (SequenceMediator) seq;
                    sequence.setFileName(file.getName());
                    synapseConfig.getArtifactDeploymentStore().addArtifact(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.