Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceID


                nRemoved++;
            }
  }//end serviceRemoved
  public void serviceChanged(ServiceDiscoveryEvent event) {
            ServiceItem srvcItem = event.getPreEventServiceItem();
            ServiceID srvcID = srvcItem.serviceID;
            logger.log(Level.FINE, ""+nChanged+" -- serviceChanged()-"
                              +srvcItem.service+"-"+srvcID);
            synchronized(lock) {
                nChanged++;
            }
View Full Code Here


  if(log != null) log.snapshot();
        /* The service ID used to register this service with lookup services
         * is always derived from the proxyID that is associated with the
         * service for the lifetime of the service.
         */
        serviceID = new ServiceID(proxyID.getMostSignificantBits(),
                                  proxyID.getLeastSignificantBits());
        /* Get a general-purpose task manager for this service */
        taskMgr = (TaskManager)Config.getNonNullEntry
                                          (config,
                                           COMPONENT_NAME,
View Full Code Here

        }
        long leastSig = 0;
        for (int i = 8; i < 16; i++) {
            leastSig = (leastSig << 8) | (secRandBuf16[i] & 0xff);
        }
        return new ServiceID(mostSig, leastSig);
    }//end newServiceID
View Full Code Here

        if (initLogger.isLoggable(Level.FINEST)) {
            initLogger.log(Level.FINEST, "Discovery manager is: {0}",
      lookupDiscMgr);
  }   

        ServiceID lookupID = new ServiceID(
      serviceID.getMostSignificantBits(),
      serviceID.getLeastSignificantBits());

  if (initLogger.isLoggable(Level.FINEST)) {
            initLogger.log(Level.FINEST, "Creating JoinManager.");
View Full Code Here

  /* Kick off independent threads.
   */

  // start the JoinStateManager
  joinStateManager.startManager(config, log, spaceProxy,
      new ServiceID(topUuid.getMostSignificantBits(),
        topUuid.getLeastSignificantBits()),
      attributesFor());

  operationJournal.setDaemon(true);
  operationJournal.start();
View Full Code Here

     * of an item.
     */
    private void generateEvents(Item pre, Item post, long now) {
  if (inRecovery)
      return;
  ServiceID sid = (pre != null) ? pre.serviceID : post.serviceID;
  Object val = subEventByService.get(sid);
  if (val instanceof EventReg) {
      generateEvent((EventReg)val, pre, post, sid, now);
  } else if (val != null) {
      EventReg[] regs = (EventReg[])val;
View Full Code Here

    }

    /** Generate a new service ID */
    private ServiceID newServiceID() {
  Uuid uuid = serviceIdGenerator.generate();
  return new ServiceID(
      uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
    }
View Full Code Here

     @param curGroups <code>String</code> array containing the current
     *                   member groups of the registrar referenced by the
     *                   <code>reg</code> parameter
     */
    private void sendDiscarded(ServiceRegistrar reg, String[] curGroups) {
        ServiceID srvcID = reg.getServiceID();
        if(curGroups == null) { // discard request is from external source
            UnicastResponse resp = (UnicastResponse)registrars.get(srvcID);
            if(resp == null) return;
            curGroups = resp.getGroups();
        }//endif
View Full Code Here

        public boolean runAfter(List tasks, int size) {
            for(int i=0; i<size; i++) {
                TaskManager.Task t = (TaskManager.Task)tasks.get(i);
                //Compare only instances of this task class
                if( !(t instanceof ServiceIdTask) )  continue;
                ServiceID otherTaskSid = ((ServiceIdTask)t).getServiceID();
                if( thisTaskSid.equals(otherTaskSid) ) {
                    if(thisTaskSeqN > ((ServiceIdTask)t).getSeqN()) {
                        return true;//run this task after the other task
                    }//endif
                }//endif
View Full Code Here

  String host = ds.readUTF();
  int port = ds.readInt();
  if (port <= 0 || port >= 65536)
      throw new IOException("port number out of range: " + port);
  locator = new LookupLocator(host, port);
  serviceID = new ServiceID(ds);
  int groupCount = ds.readInt();
  // We know that the minimal length of a string written with
  // DataOutput.writeUTF is two bytes (for the empty string), so
  // we make some attempt to see if the count can plausibly fit
  // into this packet.
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.