coherence/net/ServiceInfo.hpp

00001 /*
00002 * ServiceInfo.hpp
00003 *
00004 * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_SERVICE_INFO_HPP
00017 #define COH_SERVICE_INFO_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 COH_OPEN_NAMESPACE2(coherence,net)
00022 
00023 
00024 /**
00025 * The ServiceInfo represents information about a Service that operates in a
00026 * clustered network environment.
00027 *
00028 * @author jh  2007.12.20
00029 */
00030 class COH_EXPORT ServiceInfo
00031     : public interface_spec<ServiceInfo>
00032     {
00033     // ----- enums ----------------------------------------------------------
00034 
00035     public:
00036         /**
00037         * Service type constants.
00038         */
00039         enum ServiceType
00040             {
00041             // REVIEW: will there be a local CacheService implementation?
00042             // we don't currently have one in .NET
00043             LOCAL_CACHE,       // a local cache service provides the means
00044                                // for handling a collection  of resources
00045                                // limited to a single client with concurrent
00046                                // access control
00047 
00048             REMOTE_CACHE,      // a remote cache service provides the means
00049                                // for handling a collection of resources
00050                                // managed by a remote cluster with concurrent
00051                                // access control
00052 
00053             REMOTE_INVOCATION  // a remote invocation service enables the
00054                                // execution of invocable objects by a remote
00055                                // cluster member
00056             };
00057 
00058 
00059     // ----- ServiceInfo interface ------------------------------------------
00060 
00061     public:
00062         /**
00063         * Return the name of the Service.
00064         *
00065         * @return the name of the Service
00066         */
00067         virtual String::View getServiceName() const = 0;
00068 
00069         /**
00070         * Return the type of the Service.
00071         *
00072         * @return the type of the Service
00073         */
00074         virtual ServiceType getServiceType() const = 0;
00075     };
00076 
00077 COH_CLOSE_NAMESPACE2
00078 
00079 #endif // COH_SERVICE_INFO_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.