01: /*
02: * Copyright 2006 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package com.google.gwt.user.client.rpc;
17:
18: /**
19: * An interface implemented by client-side RPC proxy objects. Cast the object
20: * returned from {@link com.google.gwt.core.client.GWT#create(Class)} on a
21: * {@link RemoteService} should be cast to this interface to initialize the
22: * target URL for the remote service.
23: */
24: public interface ServiceDefTarget {
25:
26: /**
27: * This exception is thrown when a service is invoked without
28: * {@link ServiceDefTarget#setServiceEntryPoint(String)} having been called.
29: */
30: public static class NoServiceEntryPointSpecifiedException extends
31: InvocationException {
32:
33: public NoServiceEntryPointSpecifiedException() {
34: super ("Service implementation URL not specified");
35: }
36: }
37:
38: /**
39: * Gets the URL of a service implementation.
40: *
41: * @return the last value passed to {@link #setServiceEntryPoint(String)}
42: */
43: String getServiceEntryPoint();
44:
45: /**
46: * Sets the URL of a service implementation.
47: *
48: * @param address a URL that designates the service implementation to call
49: */
50: void setServiceEntryPoint(String address);
51: }
|