blob: a438cb1894cfbc6255af13baeff8458f682f78f2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*******************************************************************************
* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Composent, Inc. - initial API and implementation
******************************************************************************/
package org.eclipse.ecf.remoteservice;
import java.util.Arrays;
import org.eclipse.core.runtime.Assert;
import org.eclipse.ecf.remoteservice.asyncproxy.AbstractAsyncProxyRemoteCall;
/**
* @since 4.0
*/
public class RemoteCall extends AbstractAsyncProxyRemoteCall implements IRemoteCall {
protected String method;
protected Object[] parameters;
protected long timeout;
public RemoteCall(String method, Object[] parameters, long timeout) {
this.method = method;
Assert.isNotNull(this.method);
this.parameters = parameters;
this.timeout = timeout;
}
public RemoteCall(String method, Object[] parameters) {
this(method, parameters, DEFAULT_TIMEOUT);
}
public RemoteCall(String method) {
this(method, null);
}
public String getMethod() {
return method;
}
public Object[] getParameters() {
return parameters;
}
public long getTimeout() {
return timeout;
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("RemoteCall[method="); //$NON-NLS-1$
buffer.append(method);
buffer.append(", parameters="); //$NON-NLS-1$
buffer.append(parameters != null ? Arrays.asList(parameters) : null);
buffer.append(", timeout="); //$NON-NLS-1$
buffer.append(timeout);
buffer.append("]"); //$NON-NLS-1$
return buffer.toString();
}
}
|