com.resilientedge.jockey.peer
Class PeerPlatformImpl

java.lang.Object
  |
  +--org.resilientedge.jockey.peer.PeerPlatform
        |
        +--com.resilientedge.jockey.peer.PeerPlatformImpl

public class PeerPlatformImpl
extends PeerPlatform

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
PeerPlatformImpl()
          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
 MessageBroker getMessageBroker(AppToken app, PeerGroupToken group)
          Returns a broker for the given group
 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)
          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

PeerPlatformImpl

public PeerPlatformImpl()
Basic constructor.
Method Detail

getInfo

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

getDefaultGroup

public PeerGroupToken getDefaultGroup()
Returns the default group for the application
Overrides:
getDefaultGroup in class PeerPlatform
Returns:
The DefaultGroup value

getDefaultPeerNetwork

public PeerNetwork getDefaultPeerNetwork()
Returns the default network for the group
Overrides:
getDefaultPeerNetwork in class PeerPlatform
Returns:
The DefaultPeerNetwork value

getBrowserForGroup

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

getMessageBroker

public MessageBroker getMessageBroker(AppToken app,
                                      PeerGroupToken group)
Returns a broker for the given group
Overrides:
getMessageBroker in class PeerPlatform
Parameters:
group - Description of Parameter
Returns:
The Instance value

startAppSession

public AppToken startAppSession(AppDescriptor app)
Starts a new session for the given application and returns a new session token
Overrides:
startAppSession in class PeerPlatform
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().
Overrides:
endAppSession in class PeerPlatform
Parameters:
app - the app token returned from startAppSession().

addAuthority

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

removeAuthority

public void removeAuthority(Authority authority)
Removes an application authority
Overrides:
removeAuthority in class PeerPlatform
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


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