org.resilientedge.jockey.service
Class ServiceProxy
java.lang.Object
|
+--org.resilientedge.jockey.service.ServiceProxy
- public class ServiceProxy
- extends java.lang.Object
Represents a service located locally or remotely, and allows the service to
be invoked.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- John Gardner
Method Summary |
ServiceCall |
createServiceCall(java.lang.String callName,
java.lang.Object[] arguments)
createServiceCall is provided a convenience
to create a service call to invoke methods on this proxy |
java.lang.String |
getInstanceId()
Gets the unique id of the service |
PeerToken |
getPeer()
Gets the peer that the service is located at |
ServiceResponse |
invoke(ServiceCall call,
int timeout)
Invokes the service given the arguments and timeout period |
ServiceResponseMarker |
invokeAsync(ServiceCall call,
int timeout)
Invokes the service asynchronously given the arguments and timeout
period, calling the ServiceProxyListener when updates are available. |
void |
setInstanceId(java.lang.String newValue)
Sets the unique id of the service - this is used to
resolve to the actual service in the service bridge that
is providing the service |
void |
setPeer(PeerToken newValue)
Sets the peer that the service is located at |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ServiceProxy
public ServiceProxy()
setPeer
public void setPeer(PeerToken newValue)
- Sets the peer that the service is located at
- Parameters:
newValue
- The new Peer value
setInstanceId
public void setInstanceId(java.lang.String newValue)
- Sets the unique id of the service - this is used to
resolve to the actual service in the service bridge that
is providing the service
- Parameters:
newValue
- The new InstanceId value
getPeer
public PeerToken getPeer()
- Gets the peer that the service is located at
- Returns:
- The Peer value
getInstanceId
public java.lang.String getInstanceId()
- Gets the unique id of the service
- Returns:
- The InstanceId value
createServiceCall
public ServiceCall createServiceCall(java.lang.String callName,
java.lang.Object[] arguments)
createServiceCall
is provided a convenience
to create a service call to invoke methods on this proxy
- Parameters:
callName
- a String
method namearguments
- an Object[]
values as paramters
to the method.- Returns:
- a
ServiceCall
value
invoke
public ServiceResponse invoke(ServiceCall call,
int timeout)
- Invokes the service given the arguments and timeout period
- Parameters:
call
- Description of Parametertimeout
- Description of Parameter- Returns:
- Description of the Returned Value
invokeAsync
public ServiceResponseMarker invokeAsync(ServiceCall call,
int timeout)
- Invokes the service asynchronously given the arguments and timeout
period, calling the ServiceProxyListener when updates are available.
- Parameters:
call
- Description of Parametertimeout
- Description of Parameter- Returns:
- Description of the Returned Value
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.