public class Call extends Object implements IServiceCall, Externalizable
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
arguments
Call arguments
|
protected Exception |
exception
Call exception if any, null by default
|
protected String |
serviceMethodName
Service method name
|
protected String |
serviceName
Service name
|
protected byte |
status
Call status, initial one is pending
|
static byte |
STATUS_ACCESS_DENIED
Access denied constant
|
static byte |
STATUS_APP_SHUTTING_DOWN
The application for this service is currently shutting down
|
static byte |
STATUS_GENERAL_EXCEPTION
General exception constant
|
static byte |
STATUS_INVOCATION_EXCEPTION
Exception on invocation constant
|
static byte |
STATUS_METHOD_NOT_FOUND
Service's method not found constant
|
static byte |
STATUS_NOT_CONNECTED
The remote method cannot be invoked because the client is not connected.
|
static byte |
STATUS_PENDING
Pending status constant
|
static byte |
STATUS_SERVICE_NOT_FOUND
Service not found constant
|
static byte |
STATUS_SUCCESS_NULL
Returned value is null constant
|
static byte |
STATUS_SUCCESS_RESULT
Success result constant
|
static byte |
STATUS_SUCCESS_VOID
Service returns no value constant
|
| Constructor and Description |
|---|
Call() |
Call(String method)
Creates call from method name
|
Call(String method,
Object[] args)
Creates call from method name and array of call parameters
|
Call(String name,
String method,
Object[] args)
Creates call from given service name, method name and array of call parameters
|
| Modifier and Type | Method and Description |
|---|---|
Object[] |
getArguments()
Returns array of service method arguments
|
Exception |
getException()
Get service call exception
|
long |
getReadTime()
Returns the time stamp at which this object was deserialized.
|
String |
getServiceMethodName()
Returns service method name
|
String |
getServiceName()
Returns service name
|
byte |
getStatus()
Get service call status
|
long |
getWriteTime()
Returns the time stamp at which this object was serialized.
|
boolean |
isSuccess()
Whether call was successful or not
|
void |
readExternal(ObjectInput in) |
void |
setArguments(Object[] args)
Setter for arguments.
|
void |
setException(Exception exception)
Sets exception
|
void |
setServiceMethodName(String serviceMethodName)
Setter for service method name
|
void |
setServiceName(String serviceName)
Setter for service name
|
void |
setStatus(byte status)
Sets status
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final byte STATUS_PENDING
public static final byte STATUS_SUCCESS_RESULT
public static final byte STATUS_SUCCESS_NULL
public static final byte STATUS_SUCCESS_VOID
public static final byte STATUS_SERVICE_NOT_FOUND
public static final byte STATUS_METHOD_NOT_FOUND
public static final byte STATUS_ACCESS_DENIED
public static final byte STATUS_INVOCATION_EXCEPTION
public static final byte STATUS_GENERAL_EXCEPTION
public static final byte STATUS_APP_SHUTTING_DOWN
public static final byte STATUS_NOT_CONNECTED
protected String serviceName
protected String serviceMethodName
protected Object[] arguments
protected byte status
protected Exception exception
public Call()
public Call(String method)
method - Method namepublic Call(String method, Object[] args)
method - Method nameargs - Call parameterspublic boolean isSuccess()
isSuccess in interface IServiceCalltrueon success,
falseotherwise
public String getServiceMethodName()
getServiceMethodName in interface IServiceCallpublic void setServiceMethodName(String serviceMethodName)
serviceMethodName - New service method name valuepublic String getServiceName()
getServiceName in interface IServiceCallpublic void setServiceName(String serviceName)
serviceName - New service name valuepublic Object[] getArguments()
getArguments in interface IServiceCallpublic void setArguments(Object[] args)
args - Arguments.public byte getStatus()
getStatus in interface IServiceCallpublic void setStatus(byte status)
setStatus in interface IServiceCallstatus - Status as bytepublic long getReadTime()
getReadTime in interface IServiceCallpublic long getWriteTime()
getWriteTime in interface IServiceCallpublic Exception getException()
getException in interface IServiceCallpublic void setException(Exception exception)
setException in interface IServiceCallexception - Call exceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2005–2017 Red5. All rights reserved.