Package net.jini.id

Examples of net.jini.id.Uuid


    public EventRegistration register(long evID, MarshalledObject handback,
          RemoteEventListener toInform,
          long leaseLength)
  throws UnknownEventException, LeaseDeniedException
    {
  Uuid regUuid = leaseUuid(evID);
  TestRegistration reg = new TestRegistration(regUuid, handback,
                toInform);

  Lease lease = leaseFactory.newLease(regUuid, leaseLength);
  regs.put(regUuid, reg);
View Full Code Here


    public RemoteEvent generateEvent(long evID, int maxTries)
  throws RemoteException, UnknownEventException
    {
  TestRegistration reg = null;
  Uuid regUuid = leaseUuid(evID);
 
        reg = (TestRegistration) regs.get(regUuid);
        if (reg == null) {
      logger.log(Level.INFO, "TestGeneratorImpl: generateEvent: " +
          "Registration has been removed ... not sending event");
View Full Code Here

        {
            if (obj == null || ctx == null) {
                throw new NullPointerException("arguments must not be null");
            }//endif
            RemoteMethodControl inputProxy;
            Uuid inputProxyID;
            if(obj instanceof TestServiceProxy.ConstrainableTestServiceProxy) {
                inputProxy =
                       (RemoteMethodControl)((TestServiceProxy)obj).innerProxy;
                inputProxyID = ((ReferentUuid)obj).getReferentUuid();
            } else if( obj instanceof RemoteMethodControl ) {
View Full Code Here

    {
        /* Input okay. Create the registration and associated information */
  long curTime    = System.currentTimeMillis();
        leaseDuration   = applyBoundToLeaseDuration(leaseDuration,
                                                    leaseBound);
        Uuid regID      = UuidFactory.generate();
        Uuid leaseID    = regID;//use same ID since Reg "wraps" the lease
        long expiration = curTime + leaseDuration;

        /* Prepare the new listener */
        listener = (RemoteEventListener)listenerPreparer.prepareProxy
                                                                   (listener);
View Full Code Here

                recoveryLogger.log(Level.FINEST, "Rebuilding transient state ...");
            }
      Collection regs = regByID.values();
      Iterator iter = regs.iterator();
      ServiceRegistration reg = null;
      Uuid uuid = null;
            EventLogIterator eli = null;
      while (iter.hasNext()) {
          reg = (ServiceRegistration)iter.next(); // get Reg
          uuid = (Uuid)reg.getCookie();           // get its Uuid
          if (recoveryLogger.isLoggable(Level.FINEST)) {
View Full Code Here

  }
        if (duration < 1 && duration != Lease.ANY)
      throw new IllegalArgumentException(
          "Duration must be a positive value");
        // Create new ServiceRegistration object
        Uuid uuid = UuidFactory.generate();
        EventLogIterator iter = persistent?
      eventLogFactory.iterator(uuid,
          getEventLogPath(persistenceDirectory, uuid)):
      eventLogFactory.iterator(uuid);
        ServiceRegistration reg = new ServiceRegistration(uuid, iter);
View Full Code Here

      operationsLogger.entering(mailboxSourceClass,
          "enableDeliveryDo", new Object[] {uuid, preparedTarget});
  }
  // Check for the resubmission of one of our own listeners
  if (preparedTarget instanceof ListenerProxy) {
      Uuid id = ((ListenerProxy)preparedTarget).getReferentUuid();
      if (regByID.get(id) != null) {
          if(deliveryLogger.isLoggable(Level.FINEST)) {
                    deliveryLogger.log(Level.FINEST,
                  "Disallowing resubmission of one of"
            " this service''s own listeners: {0}", id);
View Full Code Here

        // Note: the following method will throw a ThrowThis exception
        // if the registration is invalid (i.e. expired or non-existent)
        ServiceRegistration reg = getServiceRegistration(uuid);
       
        Uuid iteratorId = UuidFactory.generate();
        if(deliveryLogger.isLoggable(Level.FINEST)) {
            deliveryLogger.log(Level.FINEST,
                "Generated remote event iterator id {0}", iteratorId);
        }      
  // Log this event
View Full Code Here

        throws InvalidIteratorException, ThrowThis
    {
        // Note: the following method will throw a ThrowThis exception
        // if the registration is invalid (i.e. expired or non-existent)
        ServiceRegistration reg = getServiceRegistration(regId);
        Uuid validIterId = reg.getRemoteEventIteratorID();
        if (!iterId.equals(validIterId)) {
      if(deliveryLogger.isLoggable(Level.FINEST)) {
                deliveryLogger.log(Level.FINEST,
              "Provided iterator id " + iterId +
                    " doesn't match current valid iterator id " +
View Full Code Here

                decrementKeepAliveCount();
            }
            if (allowDGC) {
                if (!referencedSet.isEmpty()) {
                    for (Iterator i = referencedSet.iterator(); i.hasNext();) {
                        Uuid clientID = (Uuid) i.next();
                        objTable.unregisterTarget(this, clientID);
                    }
                    referencedSet.clear();
                }
                sequenceTable.clear();
View Full Code Here

TOP

Related Classes of net.jini.id.Uuid

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.