com.resilientedge.jockey.peerbridge
Class PeerPlatformBridge

java.lang.Object
  |
  +--com.resilientedge.jockey.peerbridge.PeerPlatformBridge

public class PeerPlatformBridge
extends java.lang.Object

Bridges between the client side api for peer networking and the service provider.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Constructor Summary
PeerPlatformBridge()
          Basic constructor.
 
Method Summary
 void addAuthority(Authority authority)
          Adds an application authority
 void endAppSession(AppToken app)
          End a session for the given application.
 PeerNetworkBrowser getBrowserForGroup(PeerGroupToken group)
          Allows an application to obtain a browser for a given group.
 PeerGroupToken getDefaultGroup()
          Returns the default group for the application
 PeerNetwork getDefaultPeerNetwork()
          Returns the default network for the group
 PlatformInfo getInfo()
          Returns information about the current platform and available networks
static PeerPlatformBridge getInstance()
          Returns the singleton instance
 boolean init()
          Initialize this instance.
 void releaseInstance(PeerPlatform instance)
          Releases an instance previously obtained from getInstance() This is not necessary in this java implementation; we rely on Java garbage collection.
 void removeAuthority(Authority authority)
          Removes an application authority
 AppToken startAppSession(AppDescriptor app, Authority[] authorities)
          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

PeerPlatformBridge

public PeerPlatformBridge()
Basic constructor.
Method Detail

getInstance

public static PeerPlatformBridge getInstance()
Returns the singleton instance
Returns:
The Instance value

getInfo

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

getDefaultGroup

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

getDefaultPeerNetwork

public PeerNetwork getDefaultPeerNetwork()
Returns the default network for the group
Returns:
The DefaultPeerNetwork value

getBrowserForGroup

public PeerNetworkBrowser getBrowserForGroup(PeerGroupToken group)
Allows an application to obtain a browser for a given group.
Parameters:
group - Description of Parameter
Returns:
The Instance value

startAppSession

public AppToken startAppSession(AppDescriptor app,
                                Authority[] authorities)
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 void endAppSession(AppToken app)
End a session for the given application. 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:
app - the app token returned from startAppSession().

addAuthority

public void addAuthority(Authority authority)
Adds an application authority
Parameters:
authority - The feature to be added to the Authority attribute

removeAuthority

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

releaseInstance

public void releaseInstance(PeerPlatform instance)
Releases an instance previously obtained from getInstance() This is not necessary in this java implementation; we rely on Java garbage collection.
Parameters:
instance - PeerPlatform instance

init

public boolean init()
Initialize this instance.
Returns:
true if initialized successfully.


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