JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Base_ContainerService

java.lang.Object
  |
  +--javax.telephony.media.provider.Base_Owner
        |
        +--javax.telephony.media.provider.Base_ContainerService
All Implemented Interfaces:
Async_ContainerService, CoderConstants, ContainerConstants, ContainerService, MPI.Owner

public abstract class Base_ContainerService
extends Base_Owner
implements ContainerService, Async_ContainerService

Generic code that is independent of the protocol/implementation layer. provider implementer must supply the Async_ContainerService methods.

Depends on various items from provider package.

Since:
JTAPI-1.4

Fields inherited from interface javax.telephony.media.container.ContainerConstants
b_Append, b_Create, b_Exclusive, b_Truncate, e_OK, k_InputParameters, k_MediaType, k_MediaTypes, v_AccessCopy, v_AccessRead, v_AccessWrite, v_Begin, v_Bytes, v_Create, v_Current, v_End, v_Fail, v_MDO, v_MilliSeconds
 
Fields inherited from interface javax.telephony.media.CoderConstants
v_24kADPCM, v_32kADPCM, v_44kADPCM, v_48k8BitLinear, v_48kALawPCM, v_48kMuLawPCM, v_64k8BitLinear, v_64kALawPCM, v_64kMuLawPCM, v_88k8BitLinear, v_88kALawPCM, v_88kMuLawPCM, v_ADPCM_24k, v_ADPCM_32k, v_ADPCM_44k, v_ADSI, v_ALawPCM_48k, v_ALawPCM_64k, v_ALawPCM_88k, v_ASCII, v_Linear8Bit_48k, v_Linear8Bit_64k, v_Linear8Bit_88k, v_MuLawPCM_48k, v_MuLawPCM_64k, v_MuLawPCM_88k, v_TDD
 
Constructor Summary
Base_ContainerService()
           
 
Method Summary
abstract  Async_ContainerEvent async_changeMode(java.lang.String fullName, Symbol accessMode, java.util.Dictionary optargs)
          change the access rights of a container.
abstract  Async_ContainerEvent async_copy(java.lang.String fullName, java.lang.String target, java.util.Dictionary optargs)
          Copy one DataObject to new DataObject name.
abstract  Async_ContainerEvent async_createContainer(java.lang.String fullName, java.util.Dictionary optargs)
          Create a new Container.
abstract  Async_ContainerEvent async_createDataObject(java.lang.String fullName, Symbol accessMode, java.util.Dictionary optargs)
          Create a new Data Object and open it.
abstract  Async_ContainerEvent async_destroy(java.lang.String fullName, java.util.Dictionary optargs)
          remove this container and all data objects.
abstract  Async_ContainerEvent async_getInfo(java.lang.String fullName, Symbol[] keys, java.util.Dictionary optargs)
          Return arbitrary user infomation stored with a Container or DataObject.
abstract  Async_ContainerEvent async_getParameters(java.lang.String fullName, Symbol[] params, java.util.Dictionary optargs)
          get system parameters on a Container or DataObject.
abstract  Async_ContainerEvent async_listObjects(java.lang.String fullName, java.util.Dictionary optargs)
          list inner objects and containers.
abstract  Async_ContainerEvent async_openDataObject(java.lang.String fullName, Symbol accessMode, boolean ifNoExist, boolean truncate, java.util.Dictionary optargs)
          Open a Data Object.
abstract  Async_ContainerEvent async_rename(java.lang.String fullName, java.lang.String newName, java.util.Dictionary optargs)
          Rename a Container or DataObject within its current Container.
abstract  Async_ContainerEvent async_setInfo(java.lang.String fullName, java.util.Dictionary dict)
          implement Async_ContainerService
abstract  Async_ContainerEvent async_setParameters(java.lang.String fullName, java.util.Dictionary params)
          set system parameters on a Container or DataObject.
 void changeMode(java.lang.String fullName, Symbol accessMode, java.util.Dictionary optargs)
          Change the static access rights of the named DataObject.
 void copy(java.lang.String fullName, java.lang.String target, java.util.Dictionary optargs)
          Copy a DataObject to a new DataObject name.
 void createContainer(java.lang.String fullName, java.util.Dictionary optargs)
          Create a new Container.
 DataObject createDataObject(java.lang.String fullName, Symbol accessMode, java.util.Dictionary optargs)
          Create a new Media Data Object and open it.
 void destroy(java.lang.String fullName, java.util.Dictionary optargs)
          Remove the named Container or DataObject.
 java.util.Dictionary getInfo(java.lang.String fullName, Symbol[] keys, java.util.Dictionary optargs)
          Return arbitrary user infomation stored with a Container or DataObject.
 java.util.Dictionary getParameters(java.lang.String fullName, Symbol[] params, java.util.Dictionary optargs)
          Get system parameters on a Container or DataObject.
 java.lang.String[] listObjects(java.lang.String fullName, java.util.Dictionary optargs)
          List Containers and DataObjects contained in the named Container.
 DataObject openDataObject(java.lang.String fullName, Symbol accessMode, boolean ifNoExist, boolean truncate, java.util.Dictionary optargs)
          Open a Media Data Object.
 void rename(java.lang.String fullName, java.lang.String newName, java.util.Dictionary optargs)
          Rename a Container or DataObject within its current Container.
 void setInfo(java.lang.String fullName, java.util.Dictionary dict)
          implement ContainerService
 void setParameters(java.lang.String fullName, java.util.Dictionary params)
          Set system parameters on a Container or DataObject.
 
Methods inherited from class javax.telephony.media.provider.Base_Owner
addListener, onEventDone, removeListener, setExceptionHandler
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.telephony.media.container.async.Async_ContainerService
addListener, removeListener
 

Constructor Detail

Base_ContainerService

public Base_ContainerService()
Method Detail

async_setInfo

public abstract Async_ContainerEvent async_setInfo(java.lang.String fullName,
                                                   java.util.Dictionary dict)
implement Async_ContainerService
Specified by:
async_setInfo in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
setInfo

async_getInfo

public abstract Async_ContainerEvent async_getInfo(java.lang.String fullName,
                                                   Symbol[] keys,
                                                   java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Return arbitrary user infomation stored with a Container or DataObject.
Specified by:
async_getInfo in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
getInfo

async_setParameters

public abstract Async_ContainerEvent async_setParameters(java.lang.String fullName,
                                                         java.util.Dictionary params)
Description copied from interface: Async_ContainerService
set system parameters on a Container or DataObject.
Specified by:
async_setParameters in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
setParameters

async_getParameters

public abstract Async_ContainerEvent async_getParameters(java.lang.String fullName,
                                                         Symbol[] params,
                                                         java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
get system parameters on a Container or DataObject.
Specified by:
async_getParameters in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
getParameters

async_changeMode

public abstract Async_ContainerEvent async_changeMode(java.lang.String fullName,
                                                      Symbol accessMode,
                                                      java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
change the access rights of a container.
Specified by:
async_changeMode in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
Parameters:
the - name of the DataObject to open.
accessMode - one of the Symbols v_AccessRead, v_AccessWrite
See Also:
changeMode

async_copy

public abstract Async_ContainerEvent async_copy(java.lang.String fullName,
                                                java.lang.String target,
                                                java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Copy one DataObject to new DataObject name.
Specified by:
async_copy in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
copy

async_rename

public abstract Async_ContainerEvent async_rename(java.lang.String fullName,
                                                  java.lang.String newName,
                                                  java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Rename a Container or DataObject within its current Container.

Note: the newName is not a full path; it is just the last component of the new name, without any path separator characters.

Specified by:
async_rename in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
Parameters:
fullName - the current name of Container/DataObject.
newName - the new name for the Container/DataObject.
See Also:
rename

async_destroy

public abstract Async_ContainerEvent async_destroy(java.lang.String fullName,
                                                   java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
remove this container and all data objects.

Note: Destroy can succeed even if this container is open in read-only mode.

Specified by:
async_destroy in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
destroy

async_listObjects

public abstract Async_ContainerEvent async_listObjects(java.lang.String fullName,
                                                       java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
list inner objects and containers.
Specified by:
async_listObjects in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
listObjects

async_createContainer

public abstract Async_ContainerEvent async_createContainer(java.lang.String fullName,
                                                           java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Create a new Container.

Note:to create a new Data Object, use async_openObject().

Specified by:
async_createContainer in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
Parameters:
the - name of the new Container.
See Also:
createContainer

async_openDataObject

public abstract Async_ContainerEvent async_openDataObject(java.lang.String fullName,
                                                          Symbol accessMode,
                                                          boolean ifNoExist,
                                                          boolean truncate,
                                                          java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Open a Data Object.
Specified by:
async_openDataObject in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
openDataObject

async_createDataObject

public abstract Async_ContainerEvent async_createDataObject(java.lang.String fullName,
                                                            Symbol accessMode,
                                                            java.util.Dictionary optargs)
Description copied from interface: Async_ContainerService
Create a new Data Object and open it.
Specified by:
async_createDataObject in interface Async_ContainerService
Following copied from interface: javax.telephony.media.container.async.Async_ContainerService
See Also:
createDataObject

setInfo

public void setInfo(java.lang.String fullName,
                    java.util.Dictionary dict)
             throws ContainerException
implement ContainerService
Specified by:
setInfo in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container or DataObject path String.
dict - a Dictionary of infomation to be stored on the container.
Throws:
ContainerException - if anything goes wrong.
See Also:
ContainerService.getInfo(java.lang.String, javax.telephony.media.Symbol[], java.util.Dictionary)

getInfo

public java.util.Dictionary getInfo(java.lang.String fullName,
                                    Symbol[] keys,
                                    java.util.Dictionary optargs)
                             throws ContainerException
Description copied from interface: ContainerService
Return arbitrary user infomation stored with a Container or DataObject.
Specified by:
getInfo in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container or DataObject path String.
keys - a Symbol[] selecting the items to retrieve.
If keys is null, then retrieve all parameters.
optargs - a Dictionary of implementation-specific information.
Returns:
a Dictionary of information from the Container or DataObject.
Throws:
ContainerException - if anything goes wrong.
See Also:
ContainerService.setInfo(java.lang.String, java.util.Dictionary)

setParameters

public void setParameters(java.lang.String fullName,
                          java.util.Dictionary params)
                   throws ContainerException
Description copied from interface: ContainerService
Set system parameters on a Container or DataObject.
Specified by:
setParameters in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container or DataObject path String.
params - a Dictionary of parameters to be set.
Throws:
ContainerException - if anything goes wrong.
See Also:
ContainerService.getParameters(java.lang.String, javax.telephony.media.Symbol[], java.util.Dictionary)

getParameters

public java.util.Dictionary getParameters(java.lang.String fullName,
                                          Symbol[] params,
                                          java.util.Dictionary optargs)
                                   throws ContainerException
Description copied from interface: ContainerService
Get system parameters on a Container or DataObject.
Specified by:
getParameters in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container or DataObject path String.
keys - a Symbol[] selecting the items to retrieve.
If keys is null, then retrieve all parameters.
optargs - a Dictionary of implementation-specific information.
Returns:
a Dictionary of information from the Container or DataObject.
Throws:
ContainerException - if anything goes wrong.
See Also:
ContainerService.setParameters(java.lang.String, java.util.Dictionary)

changeMode

public void changeMode(java.lang.String fullName,
                       Symbol accessMode,
                       java.util.Dictionary optargs)
                throws ContainerException
Description copied from interface: ContainerService
Change the static access rights of the named DataObject. The static mode of the DataObject restricts the mode available when the DataObject is opened for Read or Write. v_AccessRead means the object can be opened for read-only. v_AccessWrite means the object can be opend for read, write, or copy.
Specified by:
changeMode in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the name of the DataObject.
accessMode - one of the Symbols v_AccessRead, v_AccessWrite
optargs - a Dictionary of implementation-specific information.
Throws:
ContainerException - if anything goes wrong.

copy

public void copy(java.lang.String fullName,
                 java.lang.String target,
                 java.util.Dictionary optargs)
          throws ContainerException
Description copied from interface: ContainerService
Copy a DataObject to a new DataObject name. The new DataObject may be in the same or a different Container. The new Container must be on the same server.

This operation can fail for numerous reasons, including:

Specified by:
copy in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the current name of the Container
target - the new name for the Container
optargs - a Dictionary of implementation-specific information.
Throws:
ContainerException - if anything goes wrong.

rename

public void rename(java.lang.String fullName,
                   java.lang.String newName,
                   java.util.Dictionary optargs)
            throws ContainerException
Description copied from interface: ContainerService
Rename a Container or DataObject within its current Container.

Note: the newName is not a full path; it is just the last component of the new name, without any path separator characters.

Specified by:
rename in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the current name of Container/DataObject.
newName - the new name for the Container/DataObject.
optargs - a Dictionary of implementation-specific information.
Throws:
ContainerException - if fullName does not exist, or if newName already exists.

destroy

public void destroy(java.lang.String fullName,
                    java.util.Dictionary optargs)
             throws ContainerException
Description copied from interface: ContainerService
Remove the named Container or DataObject. If a Container is named, remove the Container and all DataObjects in that Container.

Note: Destroy can succeed even if the Container is in read-only mode.

Specified by:
destroy in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container or DataObject path String.
optargs - a Dictionary of implementation-specific information.
Throws:
ContainerException - if container does not exist.

listObjects

public java.lang.String[] listObjects(java.lang.String fullName,
                                      java.util.Dictionary optargs)
                               throws ContainerException
Description copied from interface: ContainerService
List Containers and DataObjects contained in the named Container.

The order of objects in the list is not specified.

Specified by:
listObjects in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the full Container path String.
optargs - a Dictionary of implementation-specific information.
Returns:
a String[] with an element for each object in the container.
Throws:
ContainerException - if container does not exist.

createContainer

public void createContainer(java.lang.String fullName,
                            java.util.Dictionary optargs)
                     throws ContainerException
Description copied from interface: ContainerService
Create a new Container.

Note:to create a new Data Object, use openObject().

Specified by:
createContainer in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the name of the new Container.
optargs - a Dictionary of implementation-specific information.
Throws:
ContainerException - container cannot be created.

createDataObject

public DataObject createDataObject(java.lang.String fullName,
                                   Symbol accessMode,
                                   java.util.Dictionary optargs)
                            throws ContainerException
Description copied from interface: ContainerService
Create a new Media Data Object and open it. Returns a DataObject that can be read or written.
Specified by:
createDataObject in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the name of the DataObject to create.
accessMode - one of the Symbols v_AccessRead, v_AccessWrite, v_AccessCopy
optargs - a Dictionary of implementation-specific information.
Returns:
an open DataObject.
Throws:
ContainerException - if the Data Object is not opened.

openDataObject

public DataObject openDataObject(java.lang.String fullName,
                                 Symbol accessMode,
                                 boolean ifNoExist,
                                 boolean truncate,
                                 java.util.Dictionary optargs)
                          throws ContainerException
Description copied from interface: ContainerService
Open a Media Data Object. Returns a DataObject that can be read or written.

Note: unlike java.io streams, a DataObject is not differentiated between InputStream and OutputStream.

Argument accessMode one of the Symbols:
Symbol:Description:
v_AccessRead Sets non-exclusive READ access
v_AccessWrite Sets exclusive WRITE access
v_AccessCopy Sets WRITE access to the object while other READ accesses are being made. This access mode causes a new copy of the Object payload to be created. When the handle is closed, the new data will replace the old data such that any OPENs with READ access that occurred before this close will continue to see the old data, and any OPENs with READ access occurring after the close will see the new data.

If the named Data Object does not exist, the result is determined by the value of argument ifNoExist:

If argument accessMode is v_AccessWrite or v_AccessCopy, then argument truncate can be used to erase the contents of MDO when it is opened.

Specified by:
openDataObject in interface ContainerService
Following copied from interface: javax.telephony.media.container.ContainerService
Parameters:
fullName - the name of the DataObject to open.
accessMode - one of the Symbols v_AccessRead, v_AccessWrite, v_AccessCopy
ifNoExist - one of v_Fail (false) or v_Create (true)
truncate - if true and v_AccessWrite or v_AccessCopy then immediately erase previous contents.
optargs - a Dictionary of implementation-specific information.
Returns:
an open DataObject.
Throws:
ContainerException - if the Data Object is not opened.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org