01: // ***************************************************************
02: // * *
03: // * File:ServiceConfig.java *
04: // * *
05: // * Copyright (c) 2002 Sun Microsystems, Inc. *
06: // * All rights reserved. *
07: // * *
08: // * *
09: // * Date - Jul/16/2002 *
10: // * Author - alejandro.abdelnur@sun.com *
11: // * *
12: // ***************************************************************
13:
14: package com.sun.portal.common.service;
15:
16: import java.util.Iterator;
17:
18: /**
19: * A service configuration object used by a service container
20: * used to pass information to a service during initialization.
21: * <P>
22: *
23: * @author <A HREF="mailto:tucu@sun.com">Alejandro Abdelnur</A>
24: *
25: */
26: public interface ServiceConfig {
27:
28: /**
29: * Returns the name of this service instance. The name is specified
30: * in the deployment descriptor service's definition.
31: * <P>
32: *
33: * @return the name of the service
34: *
35: */
36: public String getServiceName();
37:
38: /**
39: * Returns a String containing the value of the named initialization
40: * parameter, or null if the parameter does not exist.
41: * <P>
42: *
43: * @param name a String specifying the name of the initialization
44: * parameter
45: *
46: * @return a String containing the value of the initialization
47: * parameter
48: *
49: */
50: public String getInitParameter(String name);
51:
52: /**
53: * Returns the names of the service's initialization parameters as
54: * an Iterator of String objects, or an empty Iterator if the service
55: * has no initialization parameters.
56: * <P>
57: *
58: * @return an Iterator of String objects containing the names of the
59: * service's initialization parameters
60: *
61: */
62: public Iterator getInitParameterNames();
63:
64: /**
65: * Returns a reference to the ServiceContext in which the caller is
66: * executing.
67: * <P>
68: * @return a ServiceContext object, used by the caller to interact
69: * with its service container.
70: *
71: * @see ServiceContainer
72: *
73: */
74: public ServiceContext getServiceContext();
75:
76: }
|