|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.remote.Transport
org.neo4j.remote.transports.RmiTransport
public final class RmiTransport
A Transport that communicates with a remote graph database using RMI.
| Constructor Summary | |
|---|---|
RmiTransport()
Create a new Transport for the rmi:// protocol. |
|
| Method Summary | |
|---|---|
protected ConnectionTarget |
create(URI resourceUri)
Create a RemoteSite that connects to a remote graph database resource on the specified URI. |
protected boolean |
handlesUri(URI resourceUri)
Determine if this remote site can handle the specified URI. |
static void |
main(String[] args)
Start a stand alone Remote graph database / RMI server. |
static void |
register(BasicGraphDatabaseServer server,
String resourceUri)
Registers a GraphDatabaseService as an RMI service with a given name. |
static void |
register(BasicGraphDatabaseServer server,
String resourceUri,
int port)
Registers a GraphDatabaseService as an RMI service with a given name on
a given port. |
static void |
register(BasicGraphDatabaseServer server,
String resourceUri,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf)
Registers a GraphDatabaseService as an RMI service with a given name on
a given port. |
| Methods inherited from class org.neo4j.remote.Transport |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RmiTransport()
Transport for the rmi:// protocol.
| Method Detail |
|---|
protected boolean handlesUri(URI resourceUri)
Transporttrue. A more advanced implementation might connect to the
resource on the specified URI to determine if it communicates in a way
supported by this remote site. A well behaving implementation returns
false instead of throwing an exception.
handlesUri in class TransportresourceUri - the URI of the remote graph database resource.
true if this site can handle the specified URI.protected ConnectionTarget create(URI resourceUri)
Transport
create in class TransportresourceUri - the URI of the remote graph database resource.
ConnectionTarget, that connects to
the specified URI.
public static void register(BasicGraphDatabaseServer server,
String resourceUri)
throws RemoteException,
MalformedURLException
GraphDatabaseService as an RMI service with a given name. If
a resource is already registered with the specified name, that resources
is replaced. Use Naming.unbind(String) to unregister the
GraphDatabaseService.
server - the graph database server to register as an RMI service.resourceUri - the name in URL form to register the exported graph database server as.
RemoteException - if the RMI registry could not be contacted.
MalformedURLException - if the resourceUri is not properly formatted.
public static void register(BasicGraphDatabaseServer server,
String resourceUri,
int port)
throws RemoteException,
MalformedURLException
GraphDatabaseService as an RMI service with a given name on
a given port. If a resource is already registered with the specified
name, that resources is replaced. Use Naming.unbind(String) to
unregister the GraphDatabaseService.
server - the graph database server to register as an RMI service.resourceUri - the name in URL form to register the exported graph database server as.port - the port number on which the remote object receives calls (if
port is zero, an anonymous port is chosen).
RemoteException - if the RMI registry could not be contacted.
MalformedURLException - if the resourceUri is not properly formatted.
public static void register(BasicGraphDatabaseServer server,
String resourceUri,
int port,
RMIClientSocketFactory csf,
RMIServerSocketFactory ssf)
throws RemoteException,
MalformedURLException
GraphDatabaseService as an RMI service with a given name on
a given port. Uses the specified socket factories to get the sockets for
the connections. If a resource is already registered with the specified
name, that resources is replaced. Use Naming.unbind(String) to
unregister the GraphDatabaseService.
server - the graph database server to register as an RMI service.resourceUri - the name in URL form to register the exported graph database server as.port - the port number on which the remote object receives calls (if
port is zero, an anonymous port is chosen).csf - the client-side socket factory for making calls to the remote
object.ssf - the server-side socket factory for receiving remote calls.
RemoteException - if the RMI registry could not be contacted.
MalformedURLException - if the resourceUri is not properly formatted.
public static void main(String[] args)
throws RemoteException,
IllegalArgumentException
java -cp kernel.jar:jta.jar:remote.jar org.neo4j.remote.sites.RmiSite PATH RESOURCE_URIIf the host in the
RESOURCE_URI resolves to the local host a
registry will be started if none is running.
Any further arguments will be used to register index services. These take
the form of:
class.name.for.the.IndexServiceImplementation:index-service-identifier
args - The arguments passed on the command line.
RemoteException - when the registration of the server fails.
IllegalArgumentException - when an error was found in the command line arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||