public interface ExtensionInteractor extends Interactor
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageListener(MessageListener listener)
Registers a listener for asynchronous messages from the peer arriving at this interactor.
|
void |
getContent(java.lang.String filename,
java.io.OutputStream target)
Transfers content from the specified file owned by the peer.
|
byte[] |
getContentAsBinary(java.lang.String filename)
Returns binary content from the specified file owned by the peer.
|
java.lang.String |
getContentAsUTF8(java.lang.String filename)
Returns text content from the specified file owned by the peer.
|
boolean |
isMessageDeliveryBlocked()
Returns
true if delivery of asynchronous messages to
message listeners is temporarily blocked. |
void |
putContent(java.lang.String filename,
byte[] content)
Transfers binary content to the specified file owned by the peer.
|
void |
putContent(java.lang.String filename,
ContentContainer container)
Transfers content to the specified file owned by the peer.
|
void |
putContent(java.lang.String filename,
java.io.InputStream source)
Transfers content to the specified file owned by the peer.
|
void |
putContent(java.lang.String filename,
java.lang.String text)
Transfers text content to the specified file owned by the peer.
|
void |
removeMessageListener(MessageListener listener)
Removes a listener from the list of registered message listeners.
|
java.lang.String |
request(java.lang.String req)
Executes the specified request on the peer.
|
void |
setMessageDeliveryBlocked(boolean blocked)
Enables or disables the delivery of asynchronous messages.
|
getInteractiveOutputjava.lang.String request(java.lang.String req)
throws SessionException
req - the request stringSessionExceptionvoid putContent(java.lang.String filename,
byte[] content)
throws SessionException
filename - the target file within the peer's file spacecontent - the file contentSessionException - if an error occurs in the transfervoid putContent(java.lang.String filename,
java.lang.String text)
throws SessionException
filename - the target file within the peer's file spacetext - the file contentSessionException - if an error occurs in the transfervoid putContent(java.lang.String filename,
ContentContainer container)
throws SessionException
filename - the target file within the peer's file spacecontainer - provides the file contentSessionException - if an error occurs in the transfervoid putContent(java.lang.String filename,
java.io.InputStream source)
throws java.io.IOException,
SessionException
filename - the target file within the peer's file spacesource - provides the file contentjava.io.IOException - if an error occurs reading from the sourceSessionException - if an error occurs in the transferbyte[] getContentAsBinary(java.lang.String filename)
throws SessionException
filename - the source file within the peer's file spaceSessionException - if an error occurs in the transferjava.lang.String getContentAsUTF8(java.lang.String filename)
throws SessionException
filename - the source file within the peer's file spaceSessionException - if an error occurs in the transfervoid getContent(java.lang.String filename,
java.io.OutputStream target)
throws java.io.IOException,
SessionException
filename - the source file within the peer's file spacetarget - consumes the file contentjava.io.IOException - if an error occurs writing to the targetSessionException - if an error occurs in the transfervoid addMessageListener(MessageListener listener)
listener - the listener to be registeredvoid removeMessageListener(MessageListener listener)
listener - the listener to be removedboolean isMessageDeliveryBlocked()
true if delivery of asynchronous messages to
message listeners is temporarily blocked.true if message delivery is blockedvoid setMessageDeliveryBlocked(boolean blocked)
blocked - true to disable delivery of asynchronous messagesCopyright © 2014 Integral Solutions Ltd. All Rights Reserved.