Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceID


        try {
            long m = Long.parseLong(time_low + time_mid + version_and_time_hi,
                    16);
            long l = Long.parseLong(variant_and_clock_seq + node, 16);

            return new ServiceID(m, l);
        } catch (NumberFormatException e) {
        }

        return null;
    }
View Full Code Here


  }

  private QueueInterface getQueueService(int index)
    throws IOException
  {
    final ServiceID id =
      ((ServiceListModel)queueList.getModel()).getServiceID(index);
    ServiceItem si = lookupCache.lookup(new ServiceItemFilter() {

      public boolean check(ServiceItem item) {
        if(item.serviceID.equals(id))
View Full Code Here

  }

  public boolean removeElement(Object obj)
  {
    if(obj instanceof ServiceItem) {
      ServiceID id = ((ServiceItem)obj).serviceID;
      super.remove(idList.indexOf(id));
      idList.removeElement(id);
      return true;
    }
    return super.removeElement(obj);
View Full Code Here

     *  appropriate transition mask; along with a handback containing the
     *  service ID .
     */
    public void setup(QAConfig sysConfig) throws Exception {
        int i;
        ServiceID curSrvcID;
  EventRegistration[] evntRegs;
        int regTransitions =   ServiceRegistrar.TRANSITION_MATCH_MATCH
                             | ServiceRegistrar.TRANSITION_MATCH_NOMATCH;
  super.setup(sysConfig);

View Full Code Here

     *  transition mask; along with a handback containing the service ID .
     */
    public void setup(QAConfig sysConfig) throws Exception {

        int i,j,k;
        ServiceID curSrvcID;
  EventRegistration[] evntRegs;
        int regTransitions =   ServiceRegistrar.TRANSITION_MATCH_MATCH
                             | ServiceRegistrar.TRANSITION_MATCH_NOMATCH;
  super.setup(sysConfig);

View Full Code Here

            throw new TestException("# of Events Received ("+
                                             eventVector.size()+
                                             ") != # of Events Expected ("+
                                             nExpectedEvnts+")");
  } else {
            ServiceID evntSrvcID;
            ServiceID expdSrvcID;
            ServiceID handbackSrvcID;
      for(int i=0; i<eventVector.size(); i++) {
                evnt = (ServiceEvent)eventVector.elementAt(i);
                if (evnt == null) {
                    throw new TestException
                             ("null Event returned from Vector at element "+i);
       } else {
                    if (evnt.getTransition() != expectedTransition) {
      dumpEventIDs(eventVector, serviceRegs);
                        throw new TestException("Unexpected Transition returned ("+
            evnt.getTransition()+")");
        } else {
                        evntSrvcID = evnt.getServiceID();
                        expdSrvcID = serviceRegs[i].getServiceID();
                        if ( !(evntSrvcID.equals(expdSrvcID)) ) {
                            throw new TestException("Service ID Received ("+
                evntSrvcID+
                ") != Service ID Expected ("+
                expdSrvcID+")");
      } else {
          handbackSrvcID =
        (ServiceID)(evnt.getRegistrationObject().get());

          if ( !(handbackSrvcID.equals(expdSrvcID)) ) {
        throw new TestException
            ("Handback Service ID ("+
             handbackSrvcID+
             ") != Service ID Expected ("+
             expdSrvcID+")");
View Full Code Here

    public static void dumpEventIDs(Vector eventVector,
                                    ServiceRegistration[] serviceRegs)
    {
        ServiceEvent evnt = null;
  ServiceID evntSrvcID;
  ServiceID expdSrvcID;
  ServiceID handbackSrvcID;
  for(int i=0; i<eventVector.size(); i++) {
      evnt = (ServiceEvent)eventVector.elementAt(i);
      evntSrvcID = evnt.getServiceID();
      expdSrvcID = serviceRegs[i].getServiceID();
      System.out.println("Expected ID = " + expdSrvcID + ", received ID = " + evntSrvcID);
View Full Code Here

     *  and the appropriate transition mask; along with a callback containing
     *  the service ID.
     */
    public void setup(QAConfig sysConfig) throws Exception {
        int i;
        ServiceID curSrvcID;
  EventRegistration[] evntRegs;
        int regTransitions =   ServiceRegistrar.TRANSITION_MATCH_MATCH
                             | ServiceRegistrar.TRANSITION_MATCH_NOMATCH;
  super.setup(sysConfig);

View Full Code Here

     *  the service ID .
     */
    public void setup(QAConfig sysConfig) throws Exception {

        int i,j,k;
        ServiceID curSrvcID;
        EventRegistration[] evntRegs;
        int regTransitions =   ServiceRegistrar.TRANSITION_MATCH_MATCH
                             | ServiceRegistrar.TRANSITION_MATCH_NOMATCH;
        super.setup(sysConfig);

View Full Code Here

                synchronized(regInfo) {
                    boolean oneDiscovered = false;
                    for(int i=0;i<regs.length;i++) {
                        /* care only about the generators the test started */
                        if( !lookupList.contains(regs[i]) ) continue;
                        ServiceID srvcID = regs[i].getServiceID();
                        logger.log(Level.FINE, "registration_"+regInfo.handback
                                      +" -- discovered service ID = "+srvcID);
                        logDebugEventText(evnt);
                        try {
                            String[] groups = (String[])groupsMap.get(srvcID);
View Full Code Here

TOP

Related Classes of net.jini.core.lookup.ServiceID

Copyright © 2018 www.massapicom. 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.