|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.peer.ebgum.EBGumFacade
public class EBGumFacade
This Facade is used as the only way to communicate with the
EBGridMachine
. All methods are called on this facade, and
then it generates the respective event for each method call and put them into
the EventQueue
, so they will be processed by the
EBGridMachine
Field Summary | |
---|---|
protected EBGum |
ebGridMachine
|
Constructor Summary | |
---|---|
EBGumFacade(EBGumImpl ebGumImpl)
Default constructor that receives the EBGridMachine that
will receive the events created by this facade |
|
EBGumFacade(EBGum gum,
ShutdownEventEngine engine)
Used only for tests. |
Method Summary | |
---|---|
void |
changeFilePermissions(EventQueue<ResponseEvent> responseQueue,
java.io.File file,
int permissions)
|
void |
createPlaypen(EventQueue<ResponseEvent> responseQueue,
int size)
|
void |
createStorageDirectory(EventQueue<ResponseEvent> responseQueue)
|
void |
fileExists(EventQueue<ResponseEvent> responseQueue,
java.io.File file)
|
void |
getFile(EventQueue<ResponseEvent> responseQueue,
java.lang.String filePath,
long filePos,
int size)
|
GumSpec |
getGumSpec()
Retrieves the GumSpec cached in the peer |
GumID |
getID()
Retrieves the gum identification cached in the peer |
void |
getRemoteFileDigest(EventQueue<ResponseEvent> responseQueue,
java.io.File remoteFile)
|
void |
getRemoteFileLastModification(EventQueue<ResponseEvent> responseQueue,
java.io.File remoteFile,
boolean normalized)
|
void |
getRemoteFileLength(EventQueue<ResponseEvent> responseQueue,
java.io.File file)
|
void |
getResult(EventQueue<ResponseEvent> responseQueue,
ExecutorHandle handle)
|
void |
getStatus(EventQueue<ResponseEvent> responseQueue)
|
void |
getStorageDirectory(EventQueue<ResponseEvent> responseQueue)
|
boolean |
isStarted()
|
void |
putFile(EventQueue<ResponseEvent> responseQueue,
java.lang.String remoteFile,
byte[] data,
boolean firstSlice)
|
void |
remoteExecute(EventQueue<ResponseEvent> responseQueue,
java.lang.String remoteDir,
java.lang.String command,
java.util.Map<java.lang.String,java.lang.String> environmentVars)
|
void |
start()
Start the event processor |
void |
startReplica(EventQueue<ResponseEvent> responseQueue)
|
EventQueue<ShutdownResponseEvent> |
stop()
Must be implemented by the facade to stop event processing |
void |
stopReplica(EventQueue<ResponseEvent> responseQueue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EBGum ebGridMachine
Constructor Detail |
---|
public EBGumFacade(EBGumImpl ebGumImpl)
EBGridMachine
that
will receive the events created by this facade
ebGumImpl
- The EBGridMachine
that will be called
through this facadepublic EBGumFacade(EBGum gum, ShutdownEventEngine engine)
engine
- The fake engine to be used.Method Detail |
---|
public void start()
EBGum
start
in interface EBGum
public EventQueue<ShutdownResponseEvent> stop()
EBGum
stop
in interface EBGum
public boolean isStarted()
public void remoteExecute(EventQueue<ResponseEvent> responseQueue, java.lang.String remoteDir, java.lang.String command, java.util.Map<java.lang.String,java.lang.String> environmentVars)
remoteExecute
in interface EBGum
EBGum.remoteExecute(EventQueue, String,
String, Map)
public void putFile(EventQueue<ResponseEvent> responseQueue, java.lang.String remoteFile, byte[] data, boolean firstSlice)
putFile
in interface EBGum
EBGum.putFile(EventQueue, String, byte[],
boolean)
public void getFile(EventQueue<ResponseEvent> responseQueue, java.lang.String filePath, long filePos, int size)
getFile
in interface EBGum
EBGum.getFile(EventQueue, String, long, int)
public GumID getID()
EBGum
getID
in interface EBGum
EBGum.getID()
public void getResult(EventQueue<ResponseEvent> responseQueue, ExecutorHandle handle)
getResult
in interface EBGum
EBGum.getResult(EventQueue, ExecutorHandle)
public void fileExists(EventQueue<ResponseEvent> responseQueue, java.io.File file)
fileExists
in interface EBGum
EBGum.fileExists(EventQueue, File)
public void changeFilePermissions(EventQueue<ResponseEvent> responseQueue, java.io.File file, int permissions)
changeFilePermissions
in interface EBGum
EBGum.changeFilePermissions(EventQueue, File,
int)
public void getRemoteFileLength(EventQueue<ResponseEvent> responseQueue, java.io.File file)
getRemoteFileLength
in interface EBGum
EBGum.getRemoteFileLength(EventQueue, File)
public void getRemoteFileLastModification(EventQueue<ResponseEvent> responseQueue, java.io.File remoteFile, boolean normalized)
getRemoteFileLastModification
in interface EBGum
EBGum.getRemoteFileLastModification(EventQueue,
File, boolean)
public void createPlaypen(EventQueue<ResponseEvent> responseQueue, int size)
createPlaypen
in interface EBGum
EBGum.createPlaypen(EventQueue, int)
public void createStorageDirectory(EventQueue<ResponseEvent> responseQueue)
createStorageDirectory
in interface EBGum
EBGum.createStorageDirectory(org.ourgrid.common.event.EventQueue)
public void getStorageDirectory(EventQueue<ResponseEvent> responseQueue)
getStorageDirectory
in interface EBGum
EBGum.getStorageDirectory(EventQueue)
public void getStatus(EventQueue<ResponseEvent> responseQueue)
getStatus
in interface EBGum
EBGum.getStatus(EventQueue)
public GumSpec getGumSpec()
EBGum
GumSpec
cached in the peer
getGumSpec
in interface EBGum
GumSpec
cached in the peerEBGum.getGumSpec()
public void getRemoteFileDigest(EventQueue<ResponseEvent> responseQueue, java.io.File remoteFile)
getRemoteFileDigest
in interface EBGum
EBGum.getRemoteFileDigest(EventQueue, File)
public void startReplica(EventQueue<ResponseEvent> responseQueue)
startReplica
in interface EBGum
EBGum.startReplica(EventQueue)
public void stopReplica(EventQueue<ResponseEvent> responseQueue)
stopReplica
in interface EBGum
EBGum.stopReplica(EventQueue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |