public class PyroProxy
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
PyroProxy.StreamResultIterable |
| Modifier and Type | Field and Description |
|---|---|
java.util.UUID |
correlation_id |
java.lang.String |
hostname |
java.lang.String |
objectid |
int |
port |
java.util.Set<java.lang.String> |
pyroAttrs |
java.lang.Object |
pyroHandshake |
byte[] |
pyroHmacKey |
java.util.Set<java.lang.String> |
pyroMethods |
java.util.Set<java.lang.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(java.lang.String hostname,
int port,
java.lang.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__(java.lang.Object[] args)
called by the Unpickler to restore state
args(8 or 9): pyroUri, pyroOneway(hashset), pyroMethods(set), pyroAttrs(set), pyroTimeout, pyroHmacKey, pyroHandshake, pyroMaxRetries [,pyroSerializer]
|
protected void |
_handshake()
Perform the Pyro protocol connection handshake with the Pyro daemon.
|
java.util.SortedMap<java.lang.String,byte[]> |
annotations()
Returns a sorted map with annotations to be sent with each message.
|
void |
call_oneway(java.lang.String method,
java.lang.Object... arguments)
Call a method on the remote Pyro object this proxy is for, using Oneway call semantics (return immediately).
|
java.lang.Object |
call(java.lang.String method,
java.lang.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.
|
java.lang.Object |
getattr(java.lang.String attr)
Get the value of a remote attribute.
|
protected void |
getMetadata(java.lang.String objectId)
get metadata from server (methods, attrs, oneway, ...) and remember them in some attributes of the proxy
|
protected java.util.HashSet<java.lang.String> |
getSetOfStrings(java.lang.Object strings)
Converts the given object into a set of strings.
|
void |
responseAnnotations(java.util.SortedMap<java.lang.String,byte[]> annotations,
int msgtype)
Process any response annotations (dictionary set by the daemon).
|
void |
setattr(java.lang.String attr,
java.lang.Object value)
Set a new value on a remote attribute.
|
void |
validateHandshake(java.lang.Object response)
Process and validate the initial connection handshake response data received from the daemon.
|
public java.lang.String hostname
public int port
public java.lang.String objectid
public byte[] pyroHmacKey
public java.util.UUID correlation_id
public java.lang.Object pyroHandshake
public java.util.Set<java.lang.String> pyroMethods
public java.util.Set<java.lang.String> pyroAttrs
public java.util.Set<java.lang.String> pyroOneway
public PyroProxy()
public PyroProxy(PyroURI uri) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostExceptionjava.io.IOExceptionpublic PyroProxy(java.lang.String hostname,
int port,
java.lang.String objectid)
throws java.net.UnknownHostException,
java.io.IOException
java.net.UnknownHostExceptionjava.io.IOExceptionprotected void connect()
throws java.net.UnknownHostException,
java.io.IOException
java.net.UnknownHostExceptionjava.io.IOExceptionprotected void getMetadata(java.lang.String objectId)
throws PickleException,
PyroException,
java.io.IOException
PickleExceptionPyroExceptionjava.io.IOExceptionprotected java.util.HashSet<java.lang.String> getSetOfStrings(java.lang.Object strings)
public java.lang.Object call(java.lang.String method,
java.lang.Object... arguments)
throws PickleException,
PyroException,
java.io.IOException
method - the name of the method you want to callarguments - zero or more arguments for the remote methodPickleExceptionPyroExceptionjava.io.IOExceptionpublic void call_oneway(java.lang.String method,
java.lang.Object... arguments)
throws PickleException,
PyroException,
java.io.IOException
method - the name of the method you want to callarguments - zero or more arguments for the remote methodPickleExceptionPyroExceptionjava.io.IOExceptionpublic java.lang.Object getattr(java.lang.String attr)
throws PickleException,
PyroException,
java.io.IOException
attr - the attribute namePickleExceptionPyroExceptionjava.io.IOExceptionpublic void setattr(java.lang.String attr,
java.lang.Object value)
throws PickleException,
PyroException,
java.io.IOException
attr - the attribute namevalue - the new value for the attributePickleExceptionPyroExceptionjava.io.IOExceptionpublic java.util.SortedMap<java.lang.String,byte[]> annotations()
public void close()
protected void _handshake()
throws java.io.IOException
java.io.IOExceptionpublic void validateHandshake(java.lang.Object response)
throws java.io.IOException
java.io.IOExceptionpublic void responseAnnotations(java.util.SortedMap<java.lang.String,byte[]> annotations,
int msgtype)
public void __setstate__(java.lang.Object[] args)
throws java.io.IOException
java.io.IOExceptionCopyright © 2019. All Rights Reserved.