org.resilientedge.jockey.peer
Class PeerPlatform

java.lang.Object
  |
  +--org.resilientedge.jockey.peer.PeerPlatform
Direct Known Subclasses:
PeerPlatformImpl

public abstract class PeerPlatform
extends java.lang.Object

The PeerPlatform is the primary entry point for an application to create and end sessions, add and remove credentials, and obtain access to defaults.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Constructor Summary
PeerPlatform()
           
 
Method Summary
abstract  void addAuthority(Authority authority)
          Adds an application authority
abstract  void endAppSession(AppToken app)
          Starts a new session for the given peer session token.
abstract  PeerNetworkBrowser getBrowserForGroup(PeerGroupToken group)
          Allows an application to obtain a browser for a given group.
abstract  PeerGroupToken getDefaultGroup()
          Returns the default group for the application
abstract  PeerNetwork getDefaultPeerNetwork()
          Returns the default network for the platform.
abstract  PlatformInfo getInfo()
          Returns information about the current platform and available networks
abstract  MessageBroker getMessageBroker(AppToken app, PeerGroupToken group)
          Returns a broker for the given group
abstract  void removeAuthority(Authority authority)
          Removes an application authority
abstract  AppToken startAppSession(AppDescriptor app)
          Starts a new session for the given application and returns a new session token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerPlatform

public PeerPlatform()
Method Detail

getInfo

public abstract PlatformInfo getInfo()
Returns information about the current platform and available networks
Returns:
The Info value

getDefaultGroup

public abstract PeerGroupToken getDefaultGroup()
Returns the default group for the application
Returns:
The DefaultGroup value

getDefaultPeerNetwork

public abstract PeerNetwork getDefaultPeerNetwork()
Returns the default network for the platform.
Returns:
The DefaultPeerNetwork value

getBrowserForGroup

public abstract PeerNetworkBrowser getBrowserForGroup(PeerGroupToken group)
Allows an application to obtain a browser for a given group.
Parameters:
group - group to browse
Returns:
a browser the can find information about the group.

getMessageBroker

public abstract MessageBroker getMessageBroker(AppToken app,
                                               PeerGroupToken group)
Returns a broker for the given group
Parameters:
group - application requesting a broker
group - group for which a broker is requested
Returns:
message broker

startAppSession

public abstract AppToken startAppSession(AppDescriptor app)
Starts a new session for the given application and returns a new session token
Parameters:
app - app starting a new session
Returns:
app token for this application

endAppSession

public abstract void endAppSession(AppToken app)
Starts a new session for the given peer session token. This may release resources allocated for the client application; the app should not expect to be able to send or receive messages after calling endAppSession().
Parameters:
peer - the app token returned from startAppSession().

addAuthority

public abstract void addAuthority(Authority authority)
Adds an application authority
Parameters:
authority - the new authority

removeAuthority

public abstract void removeAuthority(Authority authority)
Removes an application authority
Parameters:
authority - Description of Parameter


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.