|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.ourgrid.webstatus.WebStatusImpl
public class WebStatusImpl
Description: This is a fake peer, created to join the OurGrid Community and obtain the known peers list from the core peer and then talk to each known peer to get it's status information.
Field Summary | |
---|---|
protected static java.lang.String |
CORE_PEER_PORT
Core peer port property. |
protected static java.lang.String |
CORE_PEER_URL
Core peer url property, |
protected static java.lang.String |
DEFAULT_CORE_PEER_PORT
Default core peer port. |
protected static java.lang.String |
DEFAULT_CORE_PEER_URL
Default core peer url. |
protected static int |
DEFAULT_REFRESH_TIME
Refresh default time. |
protected static int |
DEFAULT_WEBSTATUS_PORT
Default port. |
protected static java.lang.String |
WEBSTATUS_PORT
Which port the webstatus will be bound property. |
protected static java.lang.String |
WEBSTATUS_REFRESH_TIME
The time to update property. |
protected static java.lang.String |
WEBSTATUS_SELF_ID
|
protected static java.lang.String |
WEBSTATUS_URL
WebStatus url property. |
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
WebStatusImpl()
|
|
WebStatusImpl(java.lang.String corepeerurl,
int refreshTimeInteger,
int port)
Constructs a webstatus instance. |
Method Summary | |
---|---|
void |
disableWebStatusAgent()
|
java.util.Date |
getLastTimeOfSnapshot()
Get the data/time value of last snapshot |
java.util.Collection<PeerInfoPack> |
getLocalPeerInfoList()
Gets all peer status information from local peer list. |
static void |
main(java.lang.String[] args)
|
void |
run()
From time to time, obtains the peer information. |
void |
shutdown()
Set the flag to define if thread will be run. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String WEBSTATUS_SELF_ID
protected static final java.lang.String DEFAULT_CORE_PEER_URL
protected static final java.lang.String DEFAULT_CORE_PEER_PORT
protected static final java.lang.String WEBSTATUS_PORT
protected static final java.lang.String WEBSTATUS_URL
protected static final java.lang.String WEBSTATUS_REFRESH_TIME
protected static final java.lang.String CORE_PEER_PORT
protected static final java.lang.String CORE_PEER_URL
protected static final int DEFAULT_REFRESH_TIME
protected static final int DEFAULT_WEBSTATUS_PORT
Constructor Detail |
---|
public WebStatusImpl() throws java.rmi.RemoteException
java.rmi.RemoteException
public WebStatusImpl(java.lang.String corepeerurl, int refreshTimeInteger, int port) throws java.net.MalformedURLException, java.rmi.RemoteException, java.rmi.NotBoundException
corepeerurl
- The core peer url.refreshTimeInteger
- The refresh time.port
- The port where it will be published.
java.net.MalformedURLException
java.rmi.RemoteException
java.rmi.NotBoundException
Method Detail |
---|
public java.util.Collection<PeerInfoPack> getLocalPeerInfoList() throws java.net.MalformedURLException, java.rmi.RemoteException, java.rmi.NotBoundException
getLocalPeerInfoList
in interface WebStatus
java.net.MalformedURLException
- If the corepeer URL is invalid. This should
never occurs.
java.rmi.RemoteException
- If the corepeer could not be conctacted.
java.rmi.NotBoundException
- If the corepeer is not onlinepublic java.util.Date getLastTimeOfSnapshot()
getLastTimeOfSnapshot
in interface WebStatus
public void shutdown()
public void run()
run
in interface java.lang.Runnable
public static void main(java.lang.String[] args)
public void disableWebStatusAgent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |