Package AccessGrid :: Module Venue :: Class Venue
[show private | hide private]
[frames | no frames]

Class Venue

AuthorizationMixIn --+
                     |
                    Venue


A Virtual Venue is a virtual space for collaboration on the Access Grid.
Method Summary
  __init__(self, server, name, description, dataStoreLocation, oid)
Venue constructor.
  __repr__(self)
A standard repr method to make a string that can be print'd.
  AddConnection(self, connectionDesc)
AddConnection allows an administrator to add a connection to a virtual venue to this virtual venue.
  AddData(self, dataDescription)
LEGACY: This is just left here not to change the interface for AG2.0 clients.
  AddNetworkLocationToStream(self, privateId, streamId, networkLocation)
Add a transport to an existing stream
  AddNetworkService(self, clientType, privateId)
AddNetworkService adds a net service to those in the venue
  AddService(self, serviceDescription)
The AddService method enables VenuesClients to put services in the Virtual Venue.
  AddStream(self, inStreamDescription)
Add a stream to the list of streams for this venue.
  AddSubjectToRole(self, subject, role_string)
Adds user to list of users authorized for a specific role.
  AllocateMulticastLocation(self)
This method creates a new Multicast Network Location.
  AsINIBlock(self)
This serializes the data in this venue as a INI formatted block of text.
  AsVenueDescription(self)
This creates a Venue Description filled in with the data from this venue.
  AsVenueState(self)
This creates a Venue State filled in with the data from this venue.
  channelAuthCallback(self, event, connObj)
Authorization callback to gate the connection of new clients to the venue's event channel.
  CleanupClients(self)
CleanupClients is called by a regularly scheduled task to cleanup stale client connections.
  ClientHeartbeat(self, event)
This is an Event handler for heartbeat events.
  CreateApplication(self, name, description, mimeType, aid)
Create a new application object.
  DestroyApplication(self, appId)
Destroy an application object.
  DetermineSubjectRoles(self, subject)
Return a list of roles for the calling subject
  DistributeEvent(self, event)
Distribute this event to our clients.
  Enter(self, clientProfile)
The Enter method is used by a VenueClient to gain access to the services, clients, and content found within a Virtual Venue.
  EventServiceClientExits(self, event)
This is an Event handler for normal client exits.
  EventServiceDisconnect(self, event)
This is an Event handler for Disconnect events.
  Exit(self, privateId)
The Exit method is used by a VenueClient to cleanly leave a Virtual Venue.
  FindUserByProfile(self, profile)
Find out if a given client is in the venue from their client profile.
  GetApplication(self, aid)
Return the application state for the given application object.
  GetApplications(self)
return a list of the applications in this venue.
  GetCachedProfiles(self)
This method returns a list of client profiles that have been registered for this venue.
  GetClients(self)
Return a list of the clients in this venue.
  GetConnections(self)
GetConnections returns a list of all the connections to other venues that are found within this venue.
  GetDataDescriptions(self)
  GetDataStoreInformation(self)
Retrieve an upload descriptor and a URL to the Venue's DataStore
  GetDescription(self)
GetDescription returns the description for the virtual venue.
  GetEncryptMedia(self)
Return whether we are encrypting streams or not.
  GetEventServiceLocation(self)
  GetId(self)
Return the id of this object.
  GetName(self)
GetName returns the name for the virtual venue.
  GetNetworkServices(self)
GetNetworkServices returns a list of all the network services in this venue.
  GetNextPrivateId(self)
This method creates the next Private Id.
  GetRoleNames(self)
Returns a list of role names.
  GetServices(self)
GetServices returns a list of all the services in this venue.
  GetStaticStreams(self)
GetStaticStreams returns a list of static stream descriptions to the caller.
  GetStreams(self)
GetStreams returns a list of stream descriptions to the caller.
  GetUploadDescriptor(self)
Retrieve the upload descriptor from the Venue's datastore.
  GetUsersInRole(self, role_string)
Returns a list of strings of users' names.
  ImportAuthorizationPolicy(self, policy)
This method takes a string that is an XML representation of an authorization policy.
  NegotiateCapabilities(self, vcstate)
This method takes a client profile and matching privateId, then it finds a set of streams that matches the client profile.
  RecycleMulticastLocation(self, location)
This method creates a new Multicast Network Location.
  RegenerateEncryptionKeys(self)
  RegisterNetworkService(self, networkServiceDescription)
Registers a network service with the venue.
  RemoveConnection(self, connectionDesc)
  RemoveData(self, dataDescription)
RemoveData removes persistent data from the Virtual Venue.
  RemoveNetworkLocationFromStream(self, privateId, streamId, networkLocationId)
  RemoveNetworkLocationsByPrivateId(self, privateId)
  RemoveNetworkService(self, privateId)
RemoveNetworkService removes a netservice from those in the venue
  RemoveService(self, serviceDescription)
RemoveService removes persistent service from the Virtual Venue.
  RemoveStream(self, inStreamDescription)
Remove the given stream from the venue
  RemoveSubjectFromRole(self, subject, role)
Removes a user from list of those authorized for a specific role.
  RemoveUser(self, privateId)
This method removes a user from the venue, cleaning up all the state associated with that user.
  SetConnections(self, connectionList)
SetConnections is a convenient aggregate accessor for the list of connections for this venue.
  SetDescription(self, description)
SetDescription allows an administrator to set the venues description to something new.
  SetEncryptMedia(self, value, key)
Turn media encryption on or off.
  SetName(self, name)
SetName allows an administrator to set the venues name to something new.
  SetSubjectsInRole(self, subject_list, role_string)
Sets the users in a role.
  Shutdown(self)
This method cleanly shuts down all active threads associated with the Virtual Venue.
  StartApplications(self)
Restart the application services after a server restart.
  textChannelAuthCallback(self, event, connObj)
Authorization callback to gate the connection of new clients to the venue's text channel.
  UnRegisterNetworkService(self, networkServiceDescription)
Removes a network service from the venue
  UpdateApplication(self, appDescStruct)
Update application.
  UpdateClientProfile(self, clientProfile)
UpdateClientProfile allows a VenueClient to update/modify the client profile that is stored by the Virtual Venue that they gave to the Venue when they called the Enter method.
  UpdateData(self, dataDescription, dataStoreCall)
Replace the current description for dataDescription.name with this one.
  UpdateService(self, serviceDescription)
The UpdateService method enables VenuesClients to modify a service description.
  _AddDefaultRolesToActions(self)
  _UpdateProfileCache(self, profile)
    Inherited from AuthorizationMixIn
  AddRequiredRole(self, role)
Add a role to the list of required roles for this implementation.
  GetAuthorizationManager(self)
Get the URL for the Authorization Manager.
  GetRequiredRoles(self)
Return a list of roles required by this implementation for authorization to work.

Method Details

__init__(self, server, name, description, dataStoreLocation, oid=None)
(Constructor)

Venue constructor.
Overrides:
AccessGrid.Security.AuthorizationManager.AuthorizationMixIn.__init__

__repr__(self)
(Representation operator)

A standard repr method to make a string that can be print'd.

**Returns:**

*string* Simple string representation of the Venue.

AddConnection(self, connectionDesc)

AddConnection allows an administrator to add a connection to a virtual venue to this virtual venue.

**Arguments:**

*ConnectionDescription* A connection description.

**Raises:**

AddData(self, dataDescription)

LEGACY: This is just left here not to change the interface for AG2.0 clients. (personal data)

AddNetworkLocationToStream(self, privateId, streamId, networkLocation)

Add a transport to an existing stream

**Arguments:**

*streamId* The id of the stream to which to add the transport *networkLocation* The network location (transport) to add

**Raises:**

Note: This method overwrites the private id in the incoming network location

AddNetworkService(self, clientType, privateId)

AddNetworkService adds a net service to those in the venue

AddService(self, serviceDescription)

The AddService method enables VenuesClients to put services in the Virtual Venue. Service put in the Virtual Venue through AddService is persistently stored.

**Arguments:**

*serviceDescription* A real service description.

**Raises:**

*ServiceAlreadyPresent* Raised when a service is added twice.

**Returns:**

*serviceDescription* Upon successfully adding the service.

AddStream(self, inStreamDescription)

Add a stream to the list of streams for this venue.

**Arguments:**

*inStreamDescription* An anonymous struct containing a stream description.

**Raises:**

*NotAuthorized* This is raised when the caller is not an administrator.

*BadStreamDescription* This is raised when the struct passed in cannot be successfully converted to a real Stream Description.

AddSubjectToRole(self, subject, role_string)

Adds user to list of users authorized for a specific role.

AllocateMulticastLocation(self)

This method creates a new Multicast Network Location.

**Returns:**

*location* A new multicast network location object.

AsINIBlock(self)

This serializes the data in this venue as a INI formatted block of text.

AsVenueDescription(self)

This creates a Venue Description filled in with the data from this venue.

AsVenueState(self)

This creates a Venue State filled in with the data from this venue.

channelAuthCallback(self, event, connObj)

Authorization callback to gate the connection of new clients to the venue's event channel.

event is the incoming event that triggered the authorization request. connObj is the event service connection handler object for the request.

CleanupClients(self)

CleanupClients is called by a regularly scheduled task to cleanup stale client connections.

ClientHeartbeat(self, event)

This is an Event handler for heartbeat events. When a heartbeat is received from a client we keep track of the recieve time. This is important because there is an active thread that is cleaning up inactive connections (ones who's heartbeats haven't been seen for some time).

**Arguments:**

*privateId* The privateId of the client who sent the heartbeat.

**Raises:**

*ClientNotFound* This is raised when we get a heartbeat for a client that we don't know about.

CreateApplication(self, name, description, mimeType, aid=None)

Create a new application object. Initialize the implementation, and create a web service interface for it.

**Arguments:**

*name* A name for the application instance.

*description* A description for the new application instance.

*mimeType* A mime-type for the new application, used to match applications with clients.

**Returns:**

*appHandle* A url to the new application object/service.

DestroyApplication(self, appId)

Destroy an application object.

**Arguments:**

*appId* The id of the application object to be destroyed.

**Raises:**

*ApplicationNotFound* Raised when an application is not found for the application id specified.

*ApplicationUnbindError* Raised when the hosting environment can't unbind the application from the web service layer.

DetermineSubjectRoles(self, subject)

Return a list of roles for the calling subject

DistributeEvent(self, event)

Distribute this event to our clients.

We can't just invoke the event channel distribute because we need to enqueue the event for venue clients that haven't yet connected.

Create a marshalled event object from the event and invoke SendEvent on each of our client objects.

Enter(self, clientProfile)

The Enter method is used by a VenueClient to gain access to the services, clients, and content found within a Virtual Venue.

**Arguments:**

*clientProfile* The profile of the client entering the venue.

**Returns:**

*(state, privateId, streamDescriptions)* This tuple is returned upon success. The state is a snapshot of the current venuestate. The privateId is a private, unique id assigned by the venue for this client session, the streamDescriptions are the stream descriptions the venue has found best match this clients capabilities.

EventServiceClientExits(self, event)

This is an Event handler for normal client exits.

**Arguments:**

*privateId* The private id of the user disconnecting.

EventServiceDisconnect(self, event)

This is an Event handler for Disconnect events. This keeps the Venue cleaned up by removing users that disconnect.

**Arguments:**

*privateId* The private id of the user disconnecting.

Exit(self, privateId)

The Exit method is used by a VenueClient to cleanly leave a Virtual Venue. Cleanly leaving a Virtual Venue allows the Venue to cleanup any state associated (or caused by) the VenueClients presence.

**Arguments:**

*privateId* The privateId of the client to be removed from the venue.

**Raises:**

*ClientNotFound* Raised when a privateId is not found in the venues list of clients.

FindUserByProfile(self, profile)

Find out if a given client is in the venue from their client profile. If they are, return their private id, if not, return None.

**Arguments:**

*profile* The client profile of the user being searched for.

**Returns:**

*privateId* if the user is found

*None* if the user is not found

GetApplication(self, aid)

Return the application state for the given application object.

**Arguments:**

*aid* The id of the application being retrieved.

**Raises:**

*ApplicationNotFound* Raised when the application is not found in the venue.

**Returns:**

*appState* The state of the application object.

GetApplications(self)

return a list of the applications in this venue.

GetCachedProfiles(self)

This method returns a list of client profiles that have been registered for this venue.

**Returns:**

*cachedProfiles* A list of ClientProfiles.

GetClients(self)

Return a list of the clients in this venue.

GetConnections(self)

GetConnections returns a list of all the connections to other venues that are found within this venue.

**Returns:**

*self.connections* A list of connection descriptions.

GetDataStoreInformation(self)

Retrieve an upload descriptor and a URL to the Venue's DataStore

**Arguments:**

**Raises:**

**Returns:**

*(upload description, url)* the upload descriptor to the Venue's DataStore and the url to the DataStore SOAP service.

GetDescription(self)

GetDescription returns the description for the virtual venue. **Arguments:**

GetEncryptMedia(self)

Return whether we are encrypting streams or not.

GetId(self)

Returns:
the id of this object.

GetName(self)

GetName returns the name for the virtual venue.

GetNetworkServices(self)

GetNetworkServices returns a list of all the network services in this venue.
Returns:
A list of NetworkServiceDescriptions.

GetNextPrivateId(self)

This method creates the next Private Id.

**Returns:**

*privateId* A unique private id.

GetRoleNames(self)

Returns a list of role names.

GetServices(self)

GetServices returns a list of all the services in this venue.

*self.services* A list of connection descriptions.

GetStaticStreams(self)

GetStaticStreams returns a list of static stream descriptions to the caller.

GetStreams(self)

GetStreams returns a list of stream descriptions to the caller.

GetUploadDescriptor(self)

Retrieve the upload descriptor from the Venue's datastore.

**Arguments:**

**Raises:**

**Returns:**

*upload description* the upload descriptor for the data store.

*''* If there is not data store we return an empty string, because None doesn't serialize right with our SOAP implementation.

GetUsersInRole(self, role_string)

Returns a list of strings of users' names.

ImportAuthorizationPolicy(self, policy)

This method takes a string that is an XML representation of an authorization policy. This policy is parsed and this object is configured to enforce the specified policy.
Parameters:
policy - the policy as a string
           (type=an XML formatted string)

NegotiateCapabilities(self, vcstate)

This method takes a client profile and matching privateId, then it finds a set of streams that matches the client profile. Later this method could use network services to find The Best Match of all the network services, the existing streams, and all the client capabilities.

**Arguments:**

*clientProfile* The profile of the client that needs to have capabilities negotiated.

*privateId* The privateId of the client associated with the client profile passed in.

RecycleMulticastLocation(self, location)

This method creates a new Multicast Network Location.

**Returns:**

*location* A new multicast network location object.

RegisterNetworkService(self, networkServiceDescription)

Registers a network service with the venue.
Parameters:
networkServiceDescription - A network service description.

RemoveData(self, dataDescription)

RemoveData removes persistent data from the Virtual Venue. **Arguments:**

*dataDescription* A real data description.

**Raises:**

*DataNotFound* Raised when the data is not found in the Venue.

**Returns:**

*dataDescription* Upon successfully removing the data.

RemoveNetworkService(self, privateId)

RemoveNetworkService removes a netservice from those in the venue

RemoveService(self, serviceDescription)

RemoveService removes persistent service from the Virtual Venue.

**Arguments:**

*serviceDescription* A real service description.

**Raises:**

*ServiceNotFound* When a service not present is removed.

**Returns:**

*serviceDescription* Upon successfully removing the service.

RemoveStream(self, inStreamDescription)

Remove the given stream from the venue

**Arguments:**

*inStreamDescription* An anonymous struct containing a stream description to be removed.

**Raises:**

*NotAuthorized* This is raised when the caller is not an administrator.

*BadStreamDescription* This is raised when the struct passed in cannot be successfully converted to a real Stream Description.

RemoveSubjectFromRole(self, subject, role)

Removes a user from list of those authorized for a specific role.

RemoveUser(self, privateId)

This method removes a user from the venue, cleaning up all the state associated with that user.

**Arguments:**

*privateId* The private Id of the user being removed.

SetConnections(self, connectionList)

SetConnections is a convenient aggregate accessor for the list of connections for this venue. Alternatively the user could iterate over a list of connections adding them one by one, but this is more desirable.

**Arguments:**

*connectionDict* A dictionary of connections.

SetDescription(self, description)

SetDescription allows an administrator to set the venues description to something new.

**Arguments:**

*description* New description for this venue.

SetEncryptMedia(self, value, key=None)

Turn media encryption on or off.

**Arguments:**

*value* Flag indicating whether encryption should be on or off.

*key=None* An optional key for encryption, if not provided, and the value is 1, then one is created.

**Raises:**

*NotAuthorized* Raised when the caller is not an administrator.

**Returns:**

*value* The value of the EncryptMedia flag.

SetName(self, name)

SetName allows an administrator to set the venues name to something new.

**Arguments:**

*name* New name for this venue.

SetSubjectsInRole(self, subject_list, role_string)

Sets the users in a role. Be extra careful so we don't wipe out all the subjects in this role if there's an error.

Shutdown(self)

This method cleanly shuts down all active threads associated with the Virtual Venue. Currently there are a few threads in the Event Service.

StartApplications(self)

Restart the application services after a server restart.

For each app impl, awaken the app, and create a new web service binding for it.

textChannelAuthCallback(self, event, connObj)

Authorization callback to gate the connection of new clients to the venue's text channel.

event is the incoming event that triggered the authorization request. connObj is the event service connection handler object for the request.

UnRegisterNetworkService(self, networkServiceDescription)

Removes a network service from the venue
Parameters:
networkServiceDescription - A network service description.*

UpdateApplication(self, appDescStruct)

Update application.

**Arguments:**

*applicationDesc* Object describing the application.

**Raises:**

*ApplicationNotFound* Raised when an application is not found for the application id specified.

UpdateClientProfile(self, clientProfile)

UpdateClientProfile allows a VenueClient to update/modify the client profile that is stored by the Virtual Venue that they gave to the Venue when they called the Enter method.

**Arguments:**

*clientProfile* A client profile.

**Raises:**

UpdateData(self, dataDescription, dataStoreCall=0)

Replace the current description for dataDescription.name with this one.

UpdateService(self, serviceDescription)

The UpdateService method enables VenuesClients to modify a service description.

**Arguments:**

*serviceDescription* A real service description.

**Raises:**

*ServiceNotFound* Raised when service is not found.

**Returns:**

*serviceDescription* Upon successfully adding the service.

Generated by Epydoc 2.1 on Thu Apr 14 16:39:29 2005 http://epydoc.sf.net