KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > util > UniqueValueGeneratorBackend


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.util;
24
25 import java.rmi.Remote JavaDoc;
26 import java.rmi.RemoteException JavaDoc;
27
28 /**
29  * Interface for server-side implementation of unique value
30  * generator. NOTE : This is not intended to be used by clients
31  * that need unique numbers. It is only used internally
32  * by concrete UniqueValueGenerator implementations. Clients should
33  * use UniqueValueGeneratorFactory and UniqueValueGenerator instead.
34  *
35  * @author Kenneth Saks
36  */

37 public interface UniqueValueGeneratorBackend extends Remote JavaDoc {
38
39     // Name under which server side object is registered
40
String JavaDoc JNDI_NAME = "J2EE_UNIQUE_VALUE_GEN";
41
42     /**
43      * Id generated by backend upon startup that will be unique
44      * for each successive invocation of the same j2ee server instance.
45      */

46     String JavaDoc getGeneratorId() throws RemoteException JavaDoc;
47     
48     /**
49      * Get another block of unique numbers for a particular context.
50      */

51     UniqueValueBlock getNextValueBlock(String JavaDoc context) throws RemoteException JavaDoc;
52
53
54 }
55
Popular Tags