Package org.jclouds.internal
Class BaseView
java.lang.Object
com.google.common.collect.ForwardingObject
org.jclouds.internal.BaseView
- All Implemented Interfaces:
View
- Direct Known Subclasses:
BlobStoreContextImpl
,ComputeServiceContextImpl
,LoadBalancerServiceContextImpl
,RegionScopedBlobStoreContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Context
delegate()
boolean
com.google.common.reflect.TypeToken
<? extends Context> int
hashCode()
protected com.google.common.base.MoreObjects.ToStringHelper
string()
toString()
<C extends Context>
Cunwrap()
shortcut forunwrap(getWrappedType())
<C extends Context>
Cunwrap
(com.google.common.reflect.TypeToken<C> type) Return an object of the specified type to allow access to the backend context.<A extends Closeable>
AUnwraps the underlying api from this view.
-
Constructor Details
-
BaseView
-
-
Method Details
-
unwrap
Description copied from interface:View
Return an object of the specified type to allow access to the backend context. If the backend context is not assignable from the supplied type, anIllegalArgumentException
is thrown. ex.ApiContext
backendApi = computeContext.unwrap(new TypeTokeninvalid input: '<'ApiContext >(){}); -
getBackendType
- Specified by:
getBackendType
in interfaceView
- Returns:
- type of the context powering the current one.
-
unwrap
Description copied from interface:View
shortcut forunwrap(getWrappedType())
- Specified by:
unwrap
in interfaceView
- Throws:
ClassCastException
- if the user suppliedC
param is not assignableFromView.getBackendType()
-
unwrapApi
Description copied from interface:View
Unwraps the underlying api from this view. -
delegate
- Specified by:
delegate
in classcom.google.common.collect.ForwardingObject
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classcom.google.common.collect.ForwardingObject
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-