Examples of Participant


Examples of com.starflow.wf.engine.model.Participant

  public List<Participant> queryActivityExecutors(long processInstId, String activityDefId) {
    List<Participant> participants = new ArrayList<Participant>();
    List<String> users = workItemRep.queryActivityExecutors(processInstId, activityDefId);
    if(users != null) {
      for(String userid : users) {
        Participant participant = new Participant();
        participant.setParticipant(userid);
        participant.setParticType(Constants.PARTICIPANT_TYPE_PERSON);
        participants.add(participant);
      }
    }
    return participants;
  }
View Full Code Here

Examples of com.starflow.wf.engine.model.Participant

*/
public class ProcStarterParticipantMode implements ParticipantMode{

  public List<Participant> creatParticipants(AbstractFlowEvent event, ActivityElement activityXml) {
    String userid = event.getProcessInstance().getCreator();
    Participant participant = new Participant();
    participant.setParticipant(userid);
    participant.setParticType(Constants.PARTICIPANT_TYPE_PERSON);
   
    List<Participant> list = new LinkedList<Participant>();
    list.add(participant);
   
    return list;
View Full Code Here

Examples of com.threerings.parlor.tourney.data.Participant

        if (_trobj.state != TourneyObject.PENDING) {
            throw new InvocationException(TOO_LATE);
        }

        // make sure they haven't already signed up
        final Participant part = makeParticipant(body);
        if (_trobj.participants.contains(part)) {
            throw new InvocationException(ALREADY_IN_TOURNEY);
        }

        // allow the implementing class to do further join checks
        joinTourney(body);

        // check the entrance fee
        if (_trobj.config.entryFee != null) {
            if (!_trobj.config.entryFee.hasFee(body)) {
                listener.requestFailed("FAILED_ENTRY_FEE");
                return;
            }

            // make the assumption that they're going to get in
            _trobj.addToParticipants(part);

            ResultListener<Void> rl = new ResultListener<Void>() {
                public void requestCompleted (Void result) {
                    listener.requestProcessed();
                }
                public void requestFailed (Exception cause) {
                    // remove them from the tourney
                    _trobj.removeFromParticipants(part.getKey());
                    listener.requestFailed("FAILED_ENTRY_FEE");
                }
            };

            _trobj.config.entryFee.reserveFee(body, rl);
View Full Code Here

Examples of com.twilio.sdk.resource.instance.Participant

   * @see com.twilio.sdk.resource.ListResource#makeNew(com.twilio.sdk.TwilioRestClient, java.util.Map)
   */
  @Override
  protected Participant makeNew(TwilioRestClient client,
      Map<String, Object> params) {
    return new Participant(client, params);
  }
View Full Code Here

Examples of com.uwyn.rife.rep.Participant

  public void reindexFull(final SearchToolListener listener)
  {
    System.out.println("Full reindex beginning...");
    long fullIndexTime = System.currentTimeMillis();

    Participant     participant = Rep.getParticipant("scheduler");
    Scheduler       scheduler = null;
    IndexQueueExecutor   indexqueue = null;
    if (participant != null)
    {
      scheduler = (Scheduler)participant.getObject("noop");
      if (scheduler != null)
      {
        indexqueue = (IndexQueueExecutor)scheduler.getExecutor("IndexQueue");
        if (indexqueue != null)
        {
View Full Code Here

Examples of de.danet.an.workflow.api.Participant

        ("Bearbeitung einer Aktivit�t �ber ein Web-Formular      "));
  appl = (ApplicationDefinition)pd.applicationById("WebFormPlus");
  assertTrue (appl != null);
  FormalParameter[] fps = appl.formalParameters();
  assertTrue (fps.length == 2);
  Participant p = pd.participantById("currentUser");
  assertTrue (p != null);
  assertTrue (p.getName().equals("Current User"));
  assertTrue (p.getParticipantType() == ParticipantType.HUMAN);
    }
View Full Code Here

Examples of javax.media.rtp.Participant

    {
        System.out.println("### " + event);

        if ( event instanceof NewParticipantEvent )
        {
            Participant participant = ((NewParticipantEvent)event).getParticipant();
            System.out.println("### " + participant.getCNAME() + " joined the session");
        }
    }
View Full Code Here

Examples of javax.media.rtp.Participant

    /**
     * SessionListener.
     */
    public synchronized void update(SessionEvent evt) {
  if (evt instanceof NewParticipantEvent) {
      Participant p = ((NewParticipantEvent)evt).getParticipant();
      System.err.println("  - A new participant had just joined: " + p.getCNAME());
  }
    }
View Full Code Here

Examples of javax.media.rtp.Participant

     * ReceiveStreamListener
     */
    public synchronized void update( ReceiveStreamEvent evt) {

  RTPManager mgr = (RTPManager)evt.getSource();
  Participant participant = evt.getParticipant()// could be null.
  ReceiveStream stream = evt.getReceiveStream()// could be null.

  if (evt instanceof RemotePayloadChangeEvent) {
    
      System.err.println("  - Received an RTP PayloadChangeEvent.");
      System.err.println("Sorry, cannot handle payload change.");
      System.exit(0);

  }
   
  else if (evt instanceof NewReceiveStreamEvent) {

      try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();

    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
        System.err.println("  - Recevied new RTP stream: " + ctl.getFormat());
    } else
        System.err.println("  - Recevied new RTP stream");

    if (participant == null)
        System.err.println("      The sender of this stream had yet to be identified.");
    else {
        System.err.println("      The stream comes from: " + participant.getCNAME());
    }

    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
        return;

    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);

    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
        dataReceived = true;
        dataSync.notifyAll();
    }

      } catch (Exception e) {
    System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
    return;
      }
       
  }

  else if (evt instanceof StreamMappedEvent) {

       if (stream != null && stream.getDataSource() != null) {
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println("  - The previously unidentified stream ");
    if (ctl != null)
        System.err.println("      " + ctl.getFormat());
    System.err.println("      had now been identified as sent by: " + participant.getCNAME());
       }
  }

  else if (evt instanceof ByeEvent) {

       System.err.println("  - Got \"bye\" from: " + participant.getCNAME());
       PlayerWindow pw = find(stream);
       if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
       }
View Full Code Here

Examples of javax.media.rtp.Participant

     * ReceiveStreamListener
     */
    public synchronized void update( ReceiveStreamEvent evt) {

  RTPManager mgr = (RTPManager)evt.getSource();
  Participant participant = evt.getParticipant()// could be null.
  ReceiveStream stream = evt.getReceiveStream()// could be null.

  if (evt instanceof RemotePayloadChangeEvent) {
    
      System.err.println("  - Received an RTP PayloadChangeEvent.");
      System.err.println("Sorry, cannot handle payload change.");
      System.exit(0);

  }
   
  else if (evt instanceof NewReceiveStreamEvent) {

      try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();

    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
        System.err.println("  - Recevied new RTP stream: " + ctl.getFormat());
    } else
        System.err.println("  - Recevied new RTP stream");

    if (participant == null)
        System.err.println("      The sender of this stream had yet to be identified.");
    else {
        System.err.println("      The stream comes from: " + participant.getCNAME());
    }

    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
        return;

    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);

    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
        dataReceived = true;
        dataSync.notifyAll();
    }

      } catch (Exception e) {
    System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
    return;
      }
       
  }

  else if (evt instanceof StreamMappedEvent) {

       if (stream != null && stream.getDataSource() != null) {
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println("  - The previously unidentified stream ");
    if (ctl != null)
        System.err.println("      " + ctl.getFormat());
    System.err.println("      had now been identified as sent by: " + participant.getCNAME());
       }
  }

  else if (evt instanceof ByeEvent) {

       System.err.println("  - Got \"bye\" from: " + participant.getCNAME());
       PlayerWindow pw = find(stream);
       if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
       }
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.