# com.bea.jws
ServiceHandle Interface

public interface ServiceHandle
extends `Serializable`

The ServiceHandle interface provides a persistable reference to a JWS service object. A ServiceHandle can refer to both a JWS service instance or to a JWS control instance that is associated with a JWS service instance.

All Superinterfaces
  `Serializable`

All Known Subinterfaces
  `ServiceHandle`

## Field Summary

`public static final int` | `SCHEME_DEFAULT` int
`public static final int` | `SCHEME_FILE` int
`public static final int` | `SCHEME_FTP` int
`public static final int` | `SCHEME_HTTP` int
`public static final int` | `SCHEME_JMS` int
`public static final int` | `SCHEME_SMTP` int

## Method Summary

`public `String`` | `getContextURI`() Returns the base context URI that references the root of the application containing this component.
`public `String`` | `getControlID`() Returns the identity of a control instance that the handle refers to.
`public `String`` | `getConversationID`() Returns the identity of a JWS conversation instance that the handle refers to.
`public `String`` | `getJNDIBaseName`() Returns a period-separated string based on the URI, which uniquely identifies this service on this server and is used to generate unique JNDI names for objects associated with this service.
`public int` | `getScheme`() Returns the protocol scheme that was used to construct the ServiceHandle.
`public `String`` | `getURI`() Returns a protocol-indendent URI which can be used to refer to this service.
`public `URL`` | `getURL`(int scheme) Returns a URL which defines a reference to this service using the specified scheme.
`public `URL`` | `getURL`() Returns a URL which defines a reference to this service using the same scheme that was used to construct the service handle.

## Field Detail

### SCHEME_DEFAULT

    public static final int SCHEME_DEFAULT

### SCHEME_FILE

    public static final int SCHEME_FILE

### SCHEME_FTP

    public static final int SCHEME_FTP

### SCHEME_HTTP

    public static final int SCHEME_HTTP

### SCHEME_JMS

    public static final int SCHEME_JMS

### SCHEME_SMTP

    public static final int SCHEME_SMTP

## Method Detail

### getContextURI() Method

    public String getContextURI()

Returns the base context URI that references the root of the application containing this component.

### getControlID() Method

    public String getControlID()

Returns the identity of a control instance that the handle refers to. This may be null if the handle is associated with a service instance instead of a control instance.

### getConversationID() Method

    public String getConversationID()

Returns the identity of a JWS conversation instance that the handle refers to. This may be null if referring to stateless service or constructed as a result of processing a stateless operation on a service.

### getJNDIBaseName() Method

    public String getJNDIBaseName()

Returns a period-separated string based on the URI, which uniquely identifies this service on this server and is used to generate unique JNDI names for objects associated with this service.

### getScheme() Method

    public int getScheme()

Returns the protocol scheme that was used to construct the ServiceHandle.

### getURI() Method

    public String getURI()

Returns a protocol-indendent URI which can be used to refer to this service.

### getURL(int) Method

    public URL getURL(int scheme)

Returns a URL which defines a reference to this service using the specified scheme.

### getURL() Method

    public URL getURL()

Returns a URL which defines a reference to this service using the same scheme that was used to construct the service handle.