当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档
ServiceLifecycle (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档
javax.xml.rpc.server
Interface ServiceLifecycle
- public interface ServiceLifecycle
This interface defines a lifecycle interface for a JAX-RPC service endpoint.
If the service endpoint class implements the ServiceLifeycle interface, the
servlet container based JAX-RPC runtime system is required to manage the
lifecycle of the corresponding service endpoint objects.
- Version:
- $Revision: 1.2.8.1 $
- Author:
- Scott.Stark@jboss.org, Rahul Sharma (javadoc)
Method Summary |
void |
destroy()
JAX-RPC runtime system ends the lifecycle of a service endpoint instance by invoking the destroy method. |
void |
init(Object context)
Used for initialization of a service endpoint. |
init
public void init(Object context)
throws ServiceException
- Used for initialization of a service endpoint. After a service endpoint instance (an instance of a service endpoint class)
is instantiated, the JAX-RPC runtime system invokes the init method.
The service endpoint class uses the init method to initialize its configuration and setup access to any external resources.
The context parameter in the init method enables the endpoint instance to access the endpoint context provided by
the underlying JAX-RPC runtime system.
The init method implementation should typecast the context parameter to an appropriate Java type.
For service endpoints deployed on a servlet container based JAX-RPC runtime system, the context parameter is
of the Java type javax.xml.rpc.server.ServletEndpointContext. The ServletEndpointContext provides an endpoint
context maintained by the underlying servlet container based JAX-RPC runtime system
- Parameters:
context
- Endpoint context for a JAX-RPC service endpoint
- Throws:
ServiceException
- If any error in initialization of the service endpoint; or if any illegal context has been provided in the init method
destroy
public void destroy()
- JAX-RPC runtime system ends the lifecycle of a service endpoint instance by invoking the destroy method.
The service endpoint releases its resourcesin the implementation of the destroy method.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.