@Deprecated public class SipClientResource extends ClientResource
Resource.getRequest()
and
Resource.getResponse()
methods. Since a clientResource may receive
severals responses for a single request (in case of interim response), the
getResponse()
method returns the last received response object. The
Request object returned by the getRequest()
is actually a prototype
which is cloned (except the representation) just before the ClientResource.handle()
method is called.StringRepresentation
stored the entity in
memory which can be read several times but has the drawback to consume
memory.Client
class instead.Constructor and Description |
---|
SipClientResource(Context context,
Method method,
Reference reference)
Deprecated.
Constructor.
|
SipClientResource(Context context,
Method method,
String uri)
Deprecated.
Constructor.
|
SipClientResource(Context context,
Method method,
URI uri)
Deprecated.
Constructor.
|
SipClientResource(Context context,
Reference reference)
Deprecated.
Constructor.
|
SipClientResource(Context context,
SipRequest request,
SipResponse response)
Deprecated.
Constructor.
|
SipClientResource(Context context,
String uri)
Deprecated.
Constructor.
|
SipClientResource(Context context,
URI uri)
Deprecated.
Constructor.
|
SipClientResource(Method method,
Reference reference)
Deprecated.
Constructor.
|
SipClientResource(Method method,
String uri)
Deprecated.
Constructor.
|
SipClientResource(Method method,
URI uri)
Deprecated.
Constructor.
|
SipClientResource(Reference reference)
Deprecated.
Constructor.
|
SipClientResource(SipClientResource resource)
Deprecated.
Constructor.
|
SipClientResource(SipRequest request,
SipResponse response)
Deprecated.
Constructor.
|
SipClientResource(String uri)
Deprecated.
Constructor.
|
SipClientResource(URI uri)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
ack()
Deprecated.
Confirms that the client has received a final response to an INVITE
request.
|
void |
ack(Representation representation)
Deprecated.
Confirms that the client has received a final response to an INVITE
request.
|
Representation |
bye()
Deprecated.
Indicates to the server that the user agent wishes to release the call.
|
void |
cancel()
Deprecated.
Cancels a pending request with the same Call-ID, To, From and CSeq
(sequence number only) header field values.
|
static <T> T |
create(Context context,
Reference reference,
Class<? extends T> resourceInterface)
Deprecated.
Creates a client resource that proxy calls to the given Java interface
into Restlet method calls.
|
static <T> T |
create(Reference reference,
Class<? extends T> resourceInterface)
Deprecated.
Creates a client resource that proxy calls to the given Java interface
into Restlet method calls.
|
static <T> T |
create(String uri,
Class<? extends T> resourceInterface)
Deprecated.
Creates a client resource that proxy calls to the given Java interface
into Restlet method calls.
|
Request |
createRequest()
Deprecated.
Creates a new request by cloning the one wrapped by this class.
|
protected Response |
createResponse(Request request)
Deprecated.
Creates a new response for the given request.
|
String |
getCommandSequence()
Deprecated.
Returns the request's command sequence.
|
Address |
getFrom()
Deprecated.
Returns the request initiator's address.
|
SipRequest |
getRequest()
Deprecated.
Returns the handled request.
|
String |
getRequestCallId()
Deprecated.
Returns the request's call ID.
|
SipResponse |
getResponse()
Deprecated.
Returns the handled response.
|
String |
getResponseCallId()
Deprecated.
Returns the response's call ID.
|
List<SipRecipientInfo> |
getSipRequestRecipientsInfo()
Deprecated.
Returns the request's list of Via entries.
|
List<SipRecipientInfo> |
getSipResponseRecipientsInfo()
Deprecated.
Returns the response's list of Via entries.
|
Address |
getTo()
Deprecated.
Returns the request recipient's address.
|
Representation |
info()
Deprecated.
Communicating mid-session signaling information along the signaling path
for the call.
|
Representation |
info(Representation representation)
Deprecated.
Communicating mid-session signaling information along the signaling path
for the call.
|
Representation |
invite()
Deprecated.
Indicates that the user or service is being invited to participate in a
session.
|
Representation |
invite(Representation representation)
Deprecated.
Indicates that the user or service is being invited to participate in a
session.
|
Representation |
notify(Representation representation)
Deprecated.
Informs subscribers of changes in state to which the subscriber has a
subscription.
|
Representation |
options()
Deprecated.
Queries a SIP server as to its capabilities.
|
void |
publish()
Deprecated.
Creates, modifies, and removes event state associated with an
address-of-record.
|
void |
publish(Representation representation)
Deprecated.
Creates, modifies, and removes event state associated with an
address-of-record.
|
void |
refer()
Deprecated.
Indicates that the target recipient should contact a third party using
the contact information provided in the request.
|
void |
register()
Deprecated.
Registers the address listed in the To header field with a SIP server.
|
void |
register(Address to)
Deprecated.
Registers the address listed in the To header field with a SIP server.
|
void |
setCallId(String callId)
Deprecated.
Sets the identifier of the call.
|
void |
setCommandSequence(String commandSequence)
Deprecated.
Sets the identifier of the command.
|
void |
setFrom(Address from)
Deprecated.
Sets the description of the request's initiator.
|
void |
setRequest(Request request)
Deprecated.
Sets the handled request.
|
void |
setRequestCallId(String callId)
Deprecated.
Sets the request's call ID.
|
void |
setResponse(Response response)
Deprecated.
Sets the handled response.
|
void |
setTo(Address to)
Deprecated.
Sets the logical recipient of the request.
|
void |
subscribe()
Deprecated.
Requests current state and state updates from a remote node.
|
void |
subscribe(Representation representation)
Deprecated.
Requests current state and state updates from a remote node.
|
accept, accept, addQueryParameter, addQueryParameter, addQueryParameters, addSegment, createNext, delete, delete, delete, doError, doRelease, finalize, get, get, get, getAttribute, getChild, getChild, getChild, getChild, getMaxRedirects, getNext, getOnResponse, getOnSent, getParent, getParent, getRetryAttempts, getRetryDelay, handle, handle, handle, handle, handle, handle, handle, handle, handle, handleInbound, handleOutbound, hasNext, head, head, isFollowingRedirects, isRequestEntityBuffering, isResponseEntityBuffering, isRetryOnError, options, options, patch, patch, patch, patch, post, post, post, post, put, put, put, put, redirect, retry, setAttribute, setChallengeResponse, setChallengeResponse, setClientInfo, setConditions, setCookies, setEntityBuffering, setFollowingRedirects, setHostRef, setHostRef, setLoggable, setMaxRedirects, setMethod, setNext, setOnResponse, setOnSent, setOriginalRef, setProtocol, setProxyChallengeResponse, setProxyChallengeResponse, setRanges, setReference, setReference, setReferrerRef, setReferrerRef, setRequestEntityBuffering, setResponseEntityBuffering, setRetryAttempts, setRetryDelay, setRetryOnError, wrap, wrap
doCatch, doError, doInit, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
public SipClientResource(Context context, URI uri)
context
- The context.uri
- The target URI.public SipClientResource(Context context, Method method, URI uri)
context
- The context.method
- The method to call.uri
- The target URI.public SipClientResource(Context context, Method method, Reference reference)
context
- The context.method
- The method to call.reference
- The target reference.public SipClientResource(Context context, Method method, String uri)
context
- The context.method
- The method to call.uri
- The target URI.public SipClientResource(Context context, Reference reference)
context
- The context.reference
- The target reference.public SipClientResource(Context context, SipRequest request, SipResponse response)
context
- The current context.request
- The handled request.response
- The handled response.public SipClientResource(Context context, String uri)
context
- The context.uri
- The target URI.public SipClientResource(URI uri)
uri
- The target URI.public SipClientResource(Method method, URI uri)
method
- The method to call.uri
- The target URI.public SipClientResource(Method method, Reference reference)
method
- The method to call.reference
- The target reference.public SipClientResource(Method method, String uri)
method
- The method to call.uri
- The target URI.public SipClientResource(Reference reference)
reference
- The target reference.public SipClientResource(SipClientResource resource)
resource
- The client resource to copy.public SipClientResource(SipRequest request, SipResponse response)
request
- The handled request.response
- The handled response.public SipClientResource(String uri)
uri
- The target URI.public static <T> T create(Context context, Reference reference, Class<? extends T> resourceInterface)
T
- context
- The context.reference
- The target reference.resourceInterface
- The annotated resource interface class to proxy.public static <T> T create(Reference reference, Class<? extends T> resourceInterface)
T
- resourceInterface
- The annotated resource interface class to proxy.public static <T> T create(String uri, Class<? extends T> resourceInterface)
T
- uri
- The target URI.resourceInterface
- The annotated resource interface class to proxy.public void ack() throws ResourceException
ResourceException
public void ack(Representation representation) throws ResourceException
representation
- The entity to send.ResourceException
public Representation bye() throws ResourceException
ResourceException
public void cancel() throws ResourceException
ResourceException
public Request createRequest()
ClientResource
createRequest
in class ClientResource
Resource.getRequest()
protected Response createResponse(Request request)
ClientResource
createResponse
in class ClientResource
request
- The associated request.public String getCommandSequence()
public Address getFrom()
public SipRequest getRequest()
Resource
getRequest
in class Resource
public String getRequestCallId()
public SipResponse getResponse()
Resource
getResponse
in class Resource
public String getResponseCallId()
public List<SipRecipientInfo> getSipRequestRecipientsInfo()
public List<SipRecipientInfo> getSipResponseRecipientsInfo()
public Address getTo()
public Representation info() throws ResourceException
ResourceException
public Representation info(Representation representation) throws ResourceException
representation
- An optional representation.ResourceException
public Representation invite() throws ResourceException
ResourceException
public Representation invite(Representation representation) throws ResourceException
representation
- An optional representation.ResourceException
public Representation notify(Representation representation) throws ResourceException
representation
- The notification representation.ResourceException
public Representation options() throws ResourceException
options
in class ClientResource
ResourceException
public void publish() throws ResourceException
ResourceException
public void publish(Representation representation) throws ResourceException
representation
- The optional request entity.ResourceException
public void refer() throws ResourceException
ResourceException
public void register() throws ResourceException
ResourceException
public void register(Address to) throws ResourceException
to
- The To header field.ResourceException
public void setCallId(String callId)
callId
- The identifier of the call.public void setCommandSequence(String commandSequence)
commandSequence
- The identifier of the command.public void setFrom(Address from)
from
- The description of the request's initiator.public void setRequest(Request request)
Resource
setRequest
in class Resource
request
- The handled request.public void setRequestCallId(String callId)
callId
- The call ID.public void setResponse(Response response)
Resource
setResponse
in class Resource
response
- The handled response.public void setTo(Address to)
to
- The logical recipient of the request.public void subscribe() throws ResourceException
ResourceException
public void subscribe(Representation representation) throws ResourceException
representation
- The optional request entity.ResourceException
Copyright © 2005–2016. All rights reserved.