Interface marimba.channel.ApplicationContext
All Packages Class Hierarchy This Package Previous Next Index
Interface marimba.channel.ApplicationContext
- public interface ApplicationContext
- extends Object
This provides the context for an Application. It is the interface
of the application to the tuner.
- Version:
- 1.18, 01/13/97
- Author:
- Arthur van Hoff, Maurice Balick
-
appendLog(byte[])
- Logs an array of bytes for the channel.
-
appendLog(String)
- Logs a String for the channel.
-
channelFileExists(String)
- Returns true if the specified path exists for this channel.
-
getAudioClip(URL)
- Get an audio clip.
-
getBase()
- Get the base URL of this channel.
-
getChannelDirectory()
- OBSOLETE.
-
getChannelName()
- Get the name of this channel.
-
getChannelStatus(String)
- Get the status of a channel on this transmitter.
-
getCodeBase()
- Get the code base URL of this channel.
-
getDataBase()
- Get the base URL for the data directory of this channel.
-
getDataDirectory()
- Gets the base data directory for this channel.
-
getImage(URL)
- Get an image.
-
getParameter(String)
- Get an application parameter.
-
getPendingUpdates()
- Gets the UpdateReport for this channel.
-
getProfile()
- Get the profile data associated with this channel.
-
getServerName()
- Get the name of the server of this channel.
-
installData(String)
- Request the installation of new all new data or just part
in the given directory.
-
listChannelDirectory(String)
- Returns an array of strings which are the names of files in
the specified directory.
-
listChannels()
- Get a list of all the channels on this transmitter
which have been subscribed to by the user.
-
publishTime()
- Return the time at which this version of the
channel was published.
-
removeChannel(String)
- Remove a channel from this transmitter
-
restart()
- Restart the application.
-
setProfile(byte[])
- Set the profile for a channel.
-
showDocument(String)
- Show a document.
-
showDocument(String, String)
- Show a Document in a frame.
-
showDocument(URL)
- Show a document.
-
showDocument(URL, String)
- Show a document in a named frame.
-
showStatus(String)
- Show status.
-
startChannel(String, String)
- Start a channel.
-
stop()
- Stop the application.
-
subscribeChannel(String, String)
- Subscribe to a channel, but don't start it yet.
-
unsubscribeChannel(String)
- Unsubscribe a channel from this transmitter
-
update()
- Update the application.
-
updateTime()
- Return the time the channel was updated with new data.
getBase
public abstract URL getBase()
- Get the base URL of this channel.
getCodeBase
public abstract URL getCodeBase()
- Get the code base URL of this channel. This is where
the code for the channel is stored.
getDataBase
public abstract URL getDataBase()
- Get the base URL for the data directory of this channel.
This is where the directory where the channel can store
persistent data.
- See Also:
- getDataDirectory
channelFileExists
public abstract boolean channelFileExists(String path)
- Returns true if the specified path exists for this channel. Path
must be a relative pathname.
listChannelDirectory
public abstract String[] listChannelDirectory(String directory)
- Returns an array of strings which are the names of files in
the specified directory. Directory is a relative path. To
list the root of a channel, directory should be "".
Returns null if directory does not exist or is not a directory.
getDataDirectory
public abstract String getDataDirectory()
- Gets the base data directory for this channel. This directory
can be used to store persistent data. It also contains logging
and profiling data. An un authenticated channel is not allowed
to write anywhere else in the file system.
getPendingUpdates
public abstract Updates getPendingUpdates()
- Gets the UpdateReport for this channel. The update report can
be queried for a list of all the pending changes in this
channel, e.g., a list of the deletions, creations and updates
that are pending.
Returns null if there are no existing updates of any kind
pending on this channel.
- See Also:
- Updates
getChannelDirectory
public abstract String getChannelDirectory()
- OBSOLETE. Will be removed in a future release
- See Also:
- getBase, channelFileExists, listChannelDirectory
getServerName
public abstract String getServerName()
- Get the name of the server of this channel.
The server name is of the form: "hostname:port".
getChannelName
public abstract String getChannelName()
- Get the name of this channel.
getParameter
public abstract String getParameter(String nm)
- Get an application parameter. The application parameters are
specified in a properties file in the application directory.
Application parameters are case-insensitive.
installData
public abstract void installData(String dir)
- Request the installation of new all new data or just part
in the given directory. Pass an empty string to install
the entire channel.
appendLog
public abstract boolean appendLog(byte data[])
- Logs an array of bytes for the channel. The log data is sent
back to the transmitter at some point in the future, usually
when the next update is requested. Returns false if an error
occurred while creating the log entry.
appendLog
public abstract boolean appendLog(String data)
- Logs a String for the channel. The log data is sent back to
the transmitter at some point in the future, usually when the
next update is requested. Returns false if an error occurred
while creating the log entry.
getProfile
public abstract byte[] getProfile()
- Get the profile data associated with this channel. This data is
included in every request to the transmitter and can be used
for profiling. This will return null an error occurred while
reading the profile. It will return an empty profile if no
profile was created yet.
setProfile
public abstract boolean setProfile(byte data[])
- Set the profile for a channel. This data is included in every
request to the transmitter and can be used for profiling. This
will the override the previous profiling data (if any). The profile
data is application specific and can be any format you like.
The profile data can be deleting by passing in null. Returns
false if the profile could not be saved.
publishTime
public abstract long publishTime()
- Return the time at which this version of the
channel was published.
updateTime
public abstract long updateTime()
- Return the time the channel was updated with new data.
restart
public abstract void restart()
- Restart the application. The application can call this method
after recieving a notifyAvailable() call. As a result the
channel is stopped and restarted with the new changes.
stop
public abstract void stop()
- Stop the application. The application should call this
methods to notify the tuner that it wants to be destroyed.
A call to stop() and destroy() will follow shortly.
update
public abstract void update()
- Update the application. The application can call this to request
an update to occur. This will cause the tuner to contact
the transmitter (which will happen automatically some
small amount of time after this call) to find out if
an update is needed.
startChannel
public abstract void startChannel(String serverName,
String channelName)
- Start a channel.
subscribeChannel
public abstract void subscribeChannel(String serverName,
String channelName)
- Subscribe to a channel, but don't start it yet.
unsubscribeChannel
public abstract void unsubscribeChannel(String channelName)
- Unsubscribe a channel from this transmitter
removeChannel
public abstract void removeChannel(String channelName)
- Remove a channel from this transmitter
listChannels
public abstract String[] listChannels()
- Get a list of all the channels on this transmitter
which have been subscribed to by the user.
getChannelStatus
public abstract String getChannelStatus(String channelName)
- Get the status of a channel on this transmitter.
The status will be "unsubscribed", "subscribed",
or "running".
getAudioClip
public abstract AudioClip getAudioClip(URL ur)
- Get an audio clip.
getImage
public abstract Image getImage(URL url)
- Get an image.
showDocument
public abstract void showDocument(URL url)
- Show a document.
showDocument
public abstract void showDocument(URL url,
String frame)
- Show a document in a named frame.
showDocument
public abstract void showDocument(String url)
- Show a document.
showDocument
public abstract void showDocument(String url,
String frame)
- Show a Document in a frame.
showStatus
public abstract void showStatus(String msg)
- Show status.
All Packages Class Hierarchy This Package Previous Next Index