public class EncoderService extends Service
| Modifier and Type | Field and Description | 
|---|---|
| static int | ANY_SIZEIndicates if the encoding should always occur, regardless of the size. | 
| static int | DEFAULT_MINIMUM_SIZEIndicates if the default minimum size for encoding to occur. | 
| Constructor and Description | 
|---|
| EncoderService()Constructor. | 
| EncoderService(boolean enabled)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canEncode(Representation representation)Indicates if a representation can be encoded. | 
| Filter | createInboundFilter(Context context)Create the filter that should be invoked for incoming calls. | 
| Filter | createOutboundFilter(Context context)Create the filter that should be invoked for outgoing calls. | 
| java.util.List<MediaType> | getAcceptedMediaTypes()Returns the media types that should be encoded. | 
| static java.util.List<MediaType> | getDefaultAcceptedMediaTypes()Returns the list of default encoded media types. | 
| static java.util.List<MediaType> | getDefaultIgnoredMediaTypes()Returns the list of default ignored media types. | 
| java.util.List<MediaType> | getIgnoredMediaTypes()Returns the media types that should be ignored. | 
| long | getMinimumSize()Returns the minimum size a representation must have before compression is
 done. | 
| void | setMinimumSize(long mininumSize)Sets the minimum size a representation must have before compression is
 done. | 
getContext, isEnabled, isStarted, isStopped, setContext, setEnabled, start, stoppublic static final int ANY_SIZE
public static final int DEFAULT_MINIMUM_SIZE
public EncoderService()
public EncoderService(boolean enabled)
enabled - True if the service has been enabled.public static java.util.List<MediaType> getDefaultAcceptedMediaTypes()
public static java.util.List<MediaType> getDefaultIgnoredMediaTypes()
public boolean canEncode(Representation representation)
representation - The representation to test.public Filter createInboundFilter(Context context)
ServicecreateInboundFilter in class Servicecontext - The current context.public Filter createOutboundFilter(Context context)
ServicecreateOutboundFilter in class Servicecontext - The current context.Context.getClientDispatcher()public java.util.List<MediaType> getAcceptedMediaTypes()
public java.util.List<MediaType> getIgnoredMediaTypes()
public long getMinimumSize()
public void setMinimumSize(long mininumSize)
mininumSize - The minimum size a representation must have before compression
            is done.Copyright © 2005-2024 Restlet.