public class Server extends Object implements Hello, net.jini.security.proxytrust.ServerProxyTrust, net.jini.export.ProxyAccessor
Modifier and Type | Field and Description |
---|---|
protected net.jini.config.Configuration |
config |
protected Hello |
serverProxy
The server proxy, for use by getProxyVerifier
|
Modifier | Constructor and Description |
---|---|
protected |
Server(String[] configOptions)
Creates the server.
|
Modifier and Type | Method and Description |
---|---|
protected static net.jini.core.lookup.ServiceID |
createServiceID()
Creates a new service ID.
|
protected net.jini.export.Exporter |
getExporter()
Returns the exporter for exporting the server.
|
Object |
getProxy()
Returns a proxy object for this remote object.
|
net.jini.security.TrustVerifier |
getProxyVerifier()
Implement the ServerProxyTrust interface to provide a verifier for
secure smart proxies.
|
protected net.jini.core.lookup.ServiceID |
getServiceID()
Returns the service ID for this server.
|
protected void |
init()
Initializes the server, including exporting it and storing its proxy in
the registry.
|
protected void |
initAsSubject()
Initializes the server, assuming that the appropriate subject is in
effect.
|
static void |
main(String[] args)
Starts and registers a server that implements the Hello interface.
|
String |
sayHello()
Implement the Hello interface.
|
protected final net.jini.config.Configuration config
protected Hello serverProxy
protected Server(String[] configOptions) throws net.jini.config.ConfigurationException
configOptions
- options to use when getting the Configurationnet.jini.config.ConfigurationException
- if a problem occurs creating the
configurationpublic static void main(String[] args) throws Exception
args
- options to use when getting the Configurationnet.jini.config.ConfigurationException
- if a problem occurs with the
configurationRemoteException
- if a remote communication problem occursException
protected void init() throws Exception
Exception
- if a problem occursprotected void initAsSubject() throws Exception
Exception
protected net.jini.export.Exporter getExporter() throws net.jini.config.ConfigurationException, RemoteException
net.jini.config.ConfigurationException
- if a problem occurs getting the exporter
from the configurationRemoteException
- if a remote communication problem occursprotected net.jini.core.lookup.ServiceID getServiceID()
protected static net.jini.core.lookup.ServiceID createServiceID()
public String sayHello()
public net.jini.security.TrustVerifier getProxyVerifier()
getProxyVerifier
in interface net.jini.security.proxytrust.ServerProxyTrust
public Object getProxy()
getProxy
in interface net.jini.export.ProxyAccessor
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.