A ServiceFactory is used to create both client and server services. More...
Public Member Functions | |
void | close () |
Closes all currently openned services and disconnects from the Realm server. More... | |
nService | connectToService (nServiceInfo serviceInfo) |
Given an nServiceInfo object this constructs an nService object which can then be used to communicate with a remote service. More... | |
nService | connectToService (nServiceInfo serviceInfo, long timeout) |
Connects to the given service defined in the nServiceInfo and will wait for the timeout specified for the remote service to respond. More... | |
nServerService | createEventService (string name, string description) |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm. More... | |
nServerService | createEventService (string name, string description, long accessMask) |
Given a name and a description, this call constructs a new event service and advertises the new service on the realm. More... | |
nServerService | createStreamService (string name, string description) |
Given a name and a description, this call constructs a new stream service and advertises the new service on the realm. More... | |
nServiceInfo | findService (string serviceName) |
Locates the information about the specified service. More... | |
IEnumerator< nServiceInfo > | getAllServices () |
Returns an IEnumerator of all known services. More... | |
IEnumerator< nServiceInfo > | getAllServices (long timeout) |
Returns an IEnumerator of all known services. More... | |
bool | isConnected () |
If the factory has a connection to the Realm Server or not. More... | |
nServiceFactory (nSession aSession) | |
Construct a P2P Service Factory re-using an existing nSession object More... | |
nServiceFactory (nSessionAttributes sessionAttrib) | |
Contructs a P2P Service Factory instance on the realm specified by the session attributes. More... | |
nServiceFactory (nSessionAttributes sessionAttrib, string username) | |
Contructs a P2P Service Factory instance on the realm specified by the session attributes. More... | |
![]() | |
void | addObserver (IObserver o) |
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. More... | |
int | countObservers () |
Returns the number of observers of this Observable object. More... | |
void | deleteObserver (IObserver o) |
Deletes an observer from the set of observers of this object. More... | |
void | deleteObservers () |
Clears the observer list so that this object no longer has any observers. More... | |
bool | hasChanged () |
Tests if this object has changed. More... | |
void | notifyObservers () |
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed. More... | |
void | notifyObservers (Object arg) |
If this object has changed, as indicated by the More... | |
Observable () | |
Construct an Observable with zero Observers. More... | |
Additional Inherited Members | |
![]() | |
void | clearChanged () |
Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false . More... | |
void | setChanged () |
Marks this Observable object as having been changed; the hasChanged method will now return true . More... | |
A ServiceFactory is used to create both client and server services.
com.pcbsys.nirvana.client.p2p.nServiceFactory.nServiceFactory | ( | nSession | aSession | ) |
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 | ( | nSessionAttributes | sessionAttrib | ) |
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 | ( | nSessionAttributes | sessionAttrib, |
string | username | ||
) |
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 |
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.
nService com.pcbsys.nirvana.client.p2p.nServiceFactory.connectToService | ( | nServiceInfo | serviceInfo | ) |
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 |
Exception | 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 |
nService com.pcbsys.nirvana.client.p2p.nServiceFactory.connectToService | ( | nServiceInfo | serviceInfo, |
long | timeout | ||
) |
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 |
Exception | 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 |
nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createEventService | ( | string | name, |
string | description | ||
) |
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 |
nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createEventService | ( | string | name, |
string | description, | ||
long | accessMask | ||
) |
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 |
nServerService com.pcbsys.nirvana.client.p2p.nServiceFactory.createStreamService | ( | string | name, |
string | description | ||
) |
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 |
nServiceInfo com.pcbsys.nirvana.client.p2p.nServiceFactory.findService | ( | string | serviceName | ) |
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 |
IEnumerator<nServiceInfo> com.pcbsys.nirvana.client.p2p.nServiceFactory.getAllServices | ( | ) |
Returns an IEnumerator of all known services.
IEnumerator<nServiceInfo> com.pcbsys.nirvana.client.p2p.nServiceFactory.getAllServices | ( | long | timeout | ) |
Returns an IEnumerator of all known services.
timeout | Specifies how long to wait (in milliseconds) for any newly constructed services |
bool com.pcbsys.nirvana.client.p2p.nServiceFactory.isConnected | ( | ) |
If the factory has a connection to the Realm Server or not.