public class PyroProxy extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
String |
hostname |
String |
objectid |
int |
port |
Set<String> |
pyroAttrs |
byte[] |
pyroHmacKey |
Set<String> |
pyroMethods |
Set<String> |
pyroOneway |
| Constructor and Description |
|---|
PyroProxy()
No-args constructor for (un)pickling support
|
PyroProxy(PyroURI uri)
Create a proxy for the remote Pyro object denoted by the uri
|
PyroProxy(String hostname,
int port,
String objectid)
Create a proxy for the remote Pyro object on the given host and port, with the given objectid/name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
__setstate__(Object[] args)
called by the Unpickler to restore state
args(6): pyroUri, pyroOneway(hashset), pyroMethods(set), pyroAttrs(set), pyroTimeout, pyroHmacKey
|
void |
call_oneway(String method,
Object... arguments)
Call a method on the remote Pyro object this proxy is for, using Oneway call semantics (return immediately).
|
Object |
call(String method,
Object... arguments)
Call a method on the remote Pyro object this proxy is for.
|
void |
close()
Close the network connection of this Proxy.
|
protected void |
connect()
(re)connect the proxy to the remote Pyro daemon.
|
void |
finalize() |
Object |
getattr(String attr)
Get the value of a remote attribute.
|
protected void |
getMetadata(String objectId)
get metadata from server (methods, attrs, oneway, ...) and remember them in some attributes of the proxy
|
protected void |
handshake()
Perform the Pyro protocol connection handshake with the Pyro daemon.
|
void |
setattr(String attr,
Object value)
Set a new value on a remote attribute.
|
public String hostname
public int port
public String objectid
public byte[] pyroHmacKey
public PyroProxy()
public PyroProxy(PyroURI uri) throws UnknownHostException, IOException
UnknownHostExceptionIOExceptionpublic PyroProxy(String hostname, int port, String objectid) throws UnknownHostException, IOException
UnknownHostExceptionIOExceptionprotected void connect()
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionprotected void getMetadata(String objectId) throws PickleException, PyroException, IOException
PickleExceptionPyroExceptionIOExceptionpublic Object call(String method, Object... arguments) throws PickleException, PyroException, IOException
method - the name of the method you want to callarguments - zero or more arguments for the remote methodPickleExceptionPyroExceptionIOExceptionpublic void call_oneway(String method, Object... arguments) throws PickleException, PyroException, IOException
method - the name of the method you want to callarguments - zero or more arguments for the remote methodPickleExceptionPyroExceptionIOExceptionpublic Object getattr(String attr) throws PickleException, PyroException, IOException
attr - the attribute namePickleExceptionPyroExceptionIOExceptionpublic void setattr(String attr, Object value) throws PickleException, PyroException, IOException
attr - the attribute namevalue - the new value for the attributePickleExceptionPyroExceptionIOExceptionpublic void close()
protected void handshake()
throws IOException
IOExceptionpublic void __setstate__(Object[] args) throws IOException
IOExceptionCopyright © 2015. All rights reserved.