|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.ops4j.pax.reflector.impl.RemoteReflectorImpl
public final class RemoteReflectorImpl
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
RemoteReflectorImpl(ReflectorService localReflector)
|
Method Summary | |
---|---|
String |
extractContainerPart(String objectname)
Returns the container part of the objectname. |
String |
extractNamePart(String objectname)
Returns the Name part of the objectname. |
String |
getMember(String membername)
Returns the human readable form of the object instance traversed from the objectname argument. |
String |
getMemberClassName(String objectname)
Returns the name of the Class of the member identified by the objectname argument. |
String[] |
getMemberNames(Object object)
Returns all the membernames found in the object . |
String[] |
getMemberNames(String membername)
Returns all the membernames found in the member identified by membername argument. |
Object |
getMemberObject(String membername)
Returns the object of the member by the given membername. |
boolean |
isMemberSettable(String objectname)
Checks with the member of the given objectname can be set to a value. |
void |
setMember(String membername,
String value)
Assigns the value to the member identified by the membername argument. |
void |
setMemberObject(String membername,
Object value)
Assigns the value to the member identified by the membername argument. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoteReflectorImpl(ReflectorService localReflector) throws RemoteException
RemoteException
Method Detail |
---|
public String getMember(String membername) throws ReflectionException, RemoteException
objectname
argument.
getMember
in interface RemoteReflector
membername
- The name of the object of interested.
ReflectionException
- if the member does not exist.
RemoteException
- if a network problem has occurred.public Object getMemberObject(String membername) throws ReflectionException, RemoteException
getMemberObject
in interface RemoteReflector
membername
- The name of the object to traverse to and return.
ReflectionException
- if the member does not exist.
RemoteException
- if a network problem has occurred.public void setMember(String membername, String value) throws ReflectionException, RemoteException
value
to the member identified by the membername
argument.
setMember
in interface RemoteReflector
membername
- The name of the member to be assigned a value.value
- The value to be assigned to the member. For primitives, the value is converted according to
normal Java rules, but additionally a fully-qualified classname can be given, in which case
the reflector will try to instantiate such class through the default constructor, and if
successful assign the instance to the member.
ReflectionException
- If the value is not assignable to the member type or the member does not exist.
RemoteException
- if a network problem has occurred.public void setMemberObject(String membername, Object value) throws ReflectionException, RemoteException
value
to the member identified by the membername
argument.
setMemberObject
in interface RemoteReflector
membername
- The name of the member to be assigned a value.value
- The value to be assigned to the member.
ReflectionException
- If the value is not assignable to the member type.
RemoteException
- if a network problem has occurred.public String[] getMemberNames(String membername) throws ReflectionException, RemoteException
membername
argument.
If the membername
is an empty string, all root object names are returned.
getMemberNames
in interface RemoteReflector
membername
- The name of the member to query for its members.
membername
.
ReflectionException
- If the member identified by the membername
does not exist.
RemoteException
- if a network problem has occurred.public String[] getMemberNames(Object object) throws RemoteException
object
.
getMemberNames
in interface RemoteReflector
object
- The Java instance to query for its members.
object
.
RemoteException
- if a network problem has occurred.public String getMemberClassName(String objectname) throws ReflectionException, RemoteException
objectname
argument.
getMemberClassName
in interface RemoteReflector
objectname
- The name of the member to query for its Class.
ReflectionException
- if the named object does not exist.
RemoteException
- if a network problem has occurred.public boolean isMemberSettable(String objectname) throws ReflectionException, RemoteException
isMemberSettable
in interface RemoteReflector
objectname
- The member to be tested if it can be set by a setMemberObject() method call.
objectname
can be set.
ReflectionException
- if the objectname
does not identify an existing object reference.
RemoteException
- if a network problem has occurred.public String extractContainerPart(String objectname) throws RemoteException
This method must correctly return the container part of the full objectname. For instance; getContainerPart( "someRoot.Abc.Def" ), must return "someRoot.Abc", getContainerPart( "someRoot.Abc['Def']" ), must return "someRoot.Abc", and getContainerPart( "someRoot.Abc['Def'].Rst" ), must return "someRoot.Abc['Def']".
extractContainerPart
in interface RemoteReflector
objectname
- The objectname to be worked upon.
objectname
.
RemoteException
- if a network problem has occurred.public String extractNamePart(String objectname) throws RemoteException
This method must correctly return the Name part of the full objectname. For instance; getContainerPart( "someRoot.Abc.Def" ), must return "Def", getContainerPart( "someRoot.Abc['Def']" ), must return "['Def']", and getContainerPart( "someRoot.Abc['Def'].Rst" ), must return "Rst".
extractNamePart
in interface RemoteReflector
objectname
- The objectname to be worked upon.
objectname
.
RemoteException
- if a network problem has occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |