Package net.jini.id

Examples of net.jini.id.Uuid


      int m=0;
      while (m<leaseData.length) {
    final long duration = leaseData[m++];
    final long high = leaseData[m++];
    final long low = leaseData[m++];
    final Uuid uuid = UuidFactory.create(high, low);
    rslt.add(newLease(uuid, duration));
      }
  } catch (ArrayIndexOutOfBoundsException e) {
      throw new
    AssertionError("space.write<multiple> returned malformed data");
View Full Code Here


        FakeOutboundRequest fakeRequest = new FakeOutboundRequest();
        FakeOutboundRequestIterator iterator =
            new FakeOutboundRequestIterator(fakeRequest);
        FakeEndpoint ep = new FakeEndpoint(iterator);
        Uuid uuid = UuidFactory.create(1,2);
        BasicObjectEndpoint boe = new BasicObjectEndpoint(ep,uuid,false);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": reading response input stream throws IOException");
View Full Code Here

    }

    // inherit javadoc
    public void run() throws Exception {
        int counter = 1;
        Uuid uuid;
        FakeEndpoint endpoint;
        FakeOutboundRequestIterator fakeIterator;
        OutboundRequestIterator iterator;
        BasicObjectEndpoint boe;
        FakeOutputStream fos;
View Full Code Here

    }

    // inherit javadoc
    public void run() throws Exception {
        int counter = 1;
        Uuid uuid = UuidFactory.create(1,2);
        FakeOutboundRequest request = new FakeOutboundRequest();
        BasicObjectEndpoint boe = new BasicObjectEndpoint(
             new FakeEndpoint(new FakeOutboundRequestIterator(request)),
             uuid,false);
        OutboundRequestIterator iterator =
            boe.newCall(InvocationConstraints.EMPTY);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": hasNext returns true");
        logger.log(Level.FINE,"");

        assertion(iterator.hasNext() == true);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": next returns correct OutboundRequest");
        logger.log(Level.FINE,"");

        assertion(iterator.next() == request);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": uuid writen to OutboundRequest output stream");
        logger.log(Level.FINE,"");

        Uuid writtenUuid = UuidFactory.read(request.getRequestStream());
        assertion(uuid.equals(writtenUuid));

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": hasNext returns false");
View Full Code Here

        FakeOutboundRequest fakeRequest = new FakeOutboundRequest();
        FakeOutboundRequestIterator iterator =
            new FakeOutboundRequestIterator(fakeRequest);
        FakeEndpoint ep = new FakeEndpoint(iterator);
        Uuid uuid = UuidFactory.create(1,2);
        BasicObjectEndpoint boe = new BasicObjectEndpoint(ep,uuid,false);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": reading response input stream returns 0x00");
View Full Code Here

    // inherit javadoc
    public void run() throws Exception {
        BasicObjectEndpoint boe;
        Endpoint ep = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        Uuid uuid = UuidFactory.create(1,2);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 1: "
            + "BasicObjectEndpoint(null,null,false)");
        logger.log(Level.FINE,"");
View Full Code Here

        int listenPort =
            config.getIntConfigVal("com.sun.jini.test.spec.jeri.basicjeriexporter"
            + ".ExportTest_SameIDSameSE.listenPort", 9090);
        log.finest("Test creating a ServerEnpoint on port: " + listenPort);
        ServerEndpoint ep = TcpServerEndpoint.getInstance(listenPort);
        Uuid id = UuidFactory.generate();
        //Create a BasicJeriExport instance using the ServerEndoint and Uuid
        //instances created above
        log.finest("Creating BasicJeriExporter with " + ep + ", EnableDGC=true"
            + " , keepAlive=true, " + id);
        BasicJeriExporter exporter =
View Full Code Here

                ServiceItemFetchQ.Request request;
                try {
                    request = ServiceItemFetchQ.take();
                    GraphNode node = request.node;
                    if(node.getInstance()!=null) {
                        Uuid uuid = node.getInstance().getServiceBeanID();
                        ServiceID serviceID = new ServiceID(uuid.getMostSignificantBits(),
                                                            uuid.getLeastSignificantBits());
                        ServiceTemplate template = new ServiceTemplate(serviceID, null, null);
                        ServiceItem item = sdm.lookup(template, null, 1000);
                        if(item!=null) {
                            request.graphView.setGraphNodeServiceItem(node, item);
                        } else {
View Full Code Here

    public void testAddingServiceRecords() {
        List<ServiceRecord> list = new ArrayList<ServiceRecord>();
        ServiceElement element = makeServiceElement("Foo");
        int recordCount = 200;
        for(int i=0; i<recordCount; i++) {
            Uuid uuid = UuidFactory.generate();
            list.add(new ServiceRecord(uuid, element, "hostname"));

        }
        ServiceStatement statement = new ServiceStatement(element);
        for(ServiceRecord serviceRecord : list) {
View Full Code Here

    public void testUpdatingServiceRecords() {
        List<ServiceRecord> list = new ArrayList<ServiceRecord>();
        ServiceElement element = makeServiceElement("Foo");
        int recordCount = 200;
        for(int i=0; i<recordCount; i++) {
            Uuid uuid = UuidFactory.generate();
            list.add(new ServiceRecord(uuid, element, "hostname"));

        }
        ServiceStatement statement = new ServiceStatement(element);
        for(ServiceRecord serviceRecord : list) {
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.