- com
- pcbsys
- nirvana
- client
- p2p
- nServiceFactory
A ServiceFactory is used to create both client and server services. More...
Inherits Observable.
Public Member Functions | |
final void | close () |
Closes all currently openned services and disconnects from the Realm server. More... | |
final nService | connectToService (final nServiceInfo serviceInfo) throws nBaseClientException, IOException |
Given an nServiceInfo object this constructs an nService object which can then be used to communicate with a remote service. More... | |
final nService | connectToService (final nServiceInfo serviceInfo, final long timeout) throws nBaseClientException, IOException |
Connects to the given service defined in the nServiceInfo and will wait for the timeout specified for the remote service to respond. More... | |
final nServerService | createEventService (final String name, final String description) throws nBaseClientException |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm. More... | |
final nServerService | createEventService (final String name, final String description, final long accessMask) throws nBaseClientException |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm. More... | |
final nServerService | createStreamService (final String name, final String description) throws nBaseClientException |
Given a name and a description, this call constructs a new stream service and advertises the new service on the realm. More... | |
final nServiceInfo | findService (final String serviceName) throws nIllegalArgumentException |
Locates the information about the specified service. More... | |
final java.util.Enumeration | getAllServices () |
Returns an enumeration of all known services. More... | |
final boolean | isConnected () |
If the factory has a connection to the Realm Server or not. More... | |
nServiceFactory (final nSession aSession) throws nBaseClientException | |
Construct a P2P Service Factory re-using an existing nSession object. More... | |
nServiceFactory (final nSessionAttributes sessionAttrib) throws nBaseClientException | |
Contructs a P2P Service Factory instance on the realm specified by the session attributes. More... | |
nServiceFactory (final nSessionAttributes sessionAttrib, final String username) throws nBaseClientException | |
Contructs a P2P Service Factory instance on the realm specified by the session attributes. More... | |
Static Public Attributes | |
static final int | nEventServiceType = 1 |
Flag Indicating an Event Service. More... | |
static final int | nStreamServiceType = 0 |
Flag indicatiting a Stream Service. More... | |
A ServiceFactory is used to create both client and server services.
com.pcbsys.nirvana.client.p2p.nServiceFactory.nServiceFactory | ( | final nSession | aSession | ) | throws nBaseClientException |
Construct a P2P Service Factory re-using an existing nSession object.
aSession | the session to re-use |
nBaseClientException | thrown if there are any problems connecting to the services on the specific realm |
com.pcbsys.nirvana.client.p2p.nServiceFactory.nServiceFactory | ( | final nSessionAttributes | sessionAttrib | ) | throws nBaseClientException |
Contructs a P2P Service Factory instance on the realm specified by the session attributes.
sessionAttrib | The SessionAttributes that reference the desired Realm |
nBaseClientException | If unable to communicate with the realm |
com.pcbsys.nirvana.client.p2p.nServiceFactory.nServiceFactory | ( | final nSessionAttributes | sessionAttrib, |
final String | username | ||
) | throws nBaseClientException |
Contructs a P2P Service Factory instance on the realm specified by the session attributes.
sessionAttrib | The SessionAttributes that reference the desired Realm |
username | The username to supply to the realm server |
nBaseClientException | If unable to communicate with the realm |
final void com.pcbsys.nirvana.client.p2p.nServiceFactory.close | ( | ) |
Closes all currently openned services and disconnects from the Realm server.
This should be done as the last thing.
final nService com.pcbsys.nirvana.client.p2p.nServiceFactory.connectToService | ( | final nServiceInfo | serviceInfo | ) | throws nBaseClientException, IOException |
Given an nServiceInfo object this constructs an nService object which can then be used to communicate with a remote service.
serviceInfo | An nServiceInfo that contains the information regarding the service to connect to |
IOException | if unable to communicate with the remote service, see the message for further information |
nBaseClientException | If an exception occured locally, see the message for further information |
final nService com.pcbsys.nirvana.client.p2p.nServiceFactory.connectToService | ( | final nServiceInfo | serviceInfo, |
final long | timeout | ||
) | throws nBaseClientException, IOException |
Connects to the given service defined in the nServiceInfo and will wait for the timeout specified for the remote service to respond.
serviceInfo | An nServiceInfo that contains the information regarding the service to connect to |
timeout | A time in milliseconds to wait for the service to come on-line |
IOException | if unable to communicate with the remote service, see the message for further information |
nBaseClientException | If an exception occured locally, see the message for further information |
final nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createEventService | ( | final String | name, |
final String | description | ||
) | throws nBaseClientException |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm.
name | Name of the service to create |
description | A String detailing what this service is |
nBaseClientException | If an exception occured locally, see the message for further information |
final nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createEventService | ( | final String | name, |
final String | description, | ||
final long | accessMask | ||
) | throws nBaseClientException |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm.
name | Name of the service to create |
description | A String detailing what this service is |
accessMask | The long value representing the initial security mask for the service |
nBaseClientException | If an exception occured locally, see the message for further information |
final nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createStreamService | ( | final String | name, |
final String | description | ||
) | throws nBaseClientException |
Given a name and a description, this call constructs a new stream service and advertises the new service on the realm.
name | Name of the service to create |
description | A String detailing what this service is |
nBaseClientException | If an exception occured locally, see the message for further information |
final nServiceInfo com.pcbsys.nirvana.client.p2p.nServiceFactory.findService | ( | final String | serviceName | ) | throws nIllegalArgumentException |
Locates the information about the specified service.
serviceName | The name of the service to find the nServiceInfo about |
nIllegalArgumentException | if the service name is null or illegal |
final java.util.Enumeration com.pcbsys.nirvana.client.p2p.nServiceFactory.getAllServices | ( | ) |
Returns an enumeration of all known services.
final boolean com.pcbsys.nirvana.client.p2p.nServiceFactory.isConnected | ( | ) |
If the factory has a connection to the Realm Server or not.
|
static |
Flag Indicating an Event Service.
|
static |
Flag indicatiting a Stream Service.