Package nl.goodbytes.xmpp.xep0363
Class SlotManager
- java.lang.Object
-
- nl.goodbytes.xmpp.xep0363.SlotManager
-
public class SlotManager extends Object
A manager of HTTP slots.- Author:
- Guus der Kinderen, guus@goodbytes.nl
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_MAX_FILE_SIZE
-
Constructor Summary
Constructors Constructor Description SlotManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SlotconsumeSlotForPut(SecureUniqueId uuid)static URLgetGetUrl(Slot slot)static SlotManagergetInstance()LonggetMaxFileSize()static URLgetPutUrl(Slot slot)SlotgetSlot(org.xmpp.packet.JID from, String fileName, long fileSize)StringgetWebContextRoot()StringgetWebHost()IntegergetWebPort()StringgetWebProtocol()voidinitialize(SlotProvider slotProvider)voidsetMaxFileSize(Long maxFileSize)voidsetWebContextRoot(String webContextRoot)voidsetWebHost(String webHost)voidsetWebPort(int webPort)voidsetWebProtocol(String webProtocol)
-
-
-
Field Detail
-
DEFAULT_MAX_FILE_SIZE
public static final long DEFAULT_MAX_FILE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SlotManager getInstance()
-
initialize
public void initialize(SlotProvider slotProvider)
-
getMaxFileSize
public Long getMaxFileSize()
-
setMaxFileSize
public void setMaxFileSize(Long maxFileSize)
-
getSlot
public Slot getSlot(org.xmpp.packet.JID from, String fileName, long fileSize) throws TooLargeException
- Throws:
TooLargeException
-
consumeSlotForPut
public Slot consumeSlotForPut(SecureUniqueId uuid)
-
getPutUrl
public static URL getPutUrl(@Nonnull Slot slot) throws URISyntaxException, MalformedURLException
-
getGetUrl
public static URL getGetUrl(@Nonnull Slot slot) throws URISyntaxException, MalformedURLException
-
setWebProtocol
public void setWebProtocol(String webProtocol)
-
getWebProtocol
public String getWebProtocol()
-
setWebHost
public void setWebHost(String webHost)
-
getWebHost
public String getWebHost()
-
setWebPort
public void setWebPort(int webPort)
-
getWebPort
public Integer getWebPort()
-
getWebContextRoot
public String getWebContextRoot()
-
setWebContextRoot
public void setWebContextRoot(String webContextRoot)
-
-